Temps = Val(TxtDistance.Text) \ C
why the **** is this giving me an overflow? I have 'temps' declared as a double... and C is equal to 3 * 10 ^ 8... and i'm putting 1.44x10^11 in the textbox...
Printable View
Temps = Val(TxtDistance.Text) \ C
why the **** is this giving me an overflow? I have 'temps' declared as a double... and C is equal to 3 * 10 ^ 8... and i'm putting 1.44x10^11 in the textbox...
The first thing you need to realize is that Val is limited to understanding pure numbers and decimal points so Val(1.44x10^11) = 1.44
hmmm.. anyway to fix that? and even then... why is it giving me an overflow?
I don't know if it will help but see this thread.
ok thanks... btw i was getting overflow error because I put "\" instead of "/"
oh and another question... I have 2 optbuttons on my form, when I load the form, one of them is always clicked by default. So I put their values to false in form activate, but then I created a menu, and when you click on "credits" in that menu, a msgbox pops up, when you click ok on that msgbox, an optbutton is automatically clicked by default... how can I stop that?
How about moving the code from Activate to Load. Activate has problems if you are trying to debug, since the event may not work correctly if there is a breakpoint in the area (not in the activate code itself).
It sounds like you are getting into a circular reference, so you could use a boolean such that the code doesn't run if the boolean is false. Then you could toggle the boolean when needed. It's an ugly solution, but it would work.