PDA

View Full Version : [SOLVED] The equivalent for CInt for creating a long



Regouin
06-10-2005, 01:59 AM
Hi everyone,

Now I am using



lvoorwas = CInt(txtlvwas.Text)
rvoorwas = CInt(txtrvwas.Text)
hoofdwas1 = CInt(txthwas1.Text)
hoofdwas2 = CInt(txthwas2.Text)
week = CInt(txtdatum.Text)
totvoorwas = lvoorwas + rvoorwas
tothoofdwas = hoofdwas1 + hoofdwas2
txttotvwas.Text = totvoorwas
txttothwas.Text = tothoofdwas


to be able to calculate with the numbers that are typed into text boxes, only when the number I enter goes higher then 33000-something, the thing goes boom, because integer dont handle those numbers. What is the equivalent for CInt for creating a long instead of an integer?

TIA

johnske
06-10-2005, 02:28 AM
Hi Regouin,

Try

lvoorwas = CLng(txtlvwas.Text)
'etc

HTH,

john

Regouin
06-10-2005, 02:30 AM
that was what I was looking for but i couldnt find it anywhere in the helpfiles

thanks

Richie(UK)
06-10-2005, 04:16 AM
that was what I was looking for but i couldnt find it anywhere in the helpfiles

thanks
Hi Regouin,

If you place your cursor in the keyword CInt and then press the F1 button you should get the Help file details for "Type Conversion Functions" which details all of the type conversions including CInt and CLng. This is often far quicker than trying to search through the Help files yourself (although just typing CInt in the search found the same section).

HTH

Regouin
06-10-2005, 04:18 AM
thanks for the advice but I tried typing in CInt in the help window but nothing related came up, I know there would be an easy solution, but i just couldnt find the right parameters anywhere.




F1 indeed did the trick, thanks again. How ever when I type it in the help window I have to search for conversion and not CInt, so that is rather confusing. But it is all solved now.