PDA

View Full Version : converting strings to Long



kona
01-14-2002, 03:32 PM
I know if you use:

value = CLng("987654321") + 1

it will give an answer of 987654322, but if the string is a variable called string i get a "Type Mismatch: CLng" Error! Help!

string = 98765 & 4321
value = CLng(string) + 1

In case you're wondering, i need the end number to be able to contain 11 digits so an Int won't work, but surely it should be easy to change a variable which is of string type into a numerical type which can then be manipulated as a number?

Thanx in advance!

Max