Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any way to do this?? 3

Status
Not open for further replies.

The

Programmer
Jul 30, 2001
92
CA
you know how you make a value into a string so it can be put into text formatt, right? ( str(whatever) ). well is there a way to make it go backwards? I want to give the computer a number typed in by the user, but I don't know how.
 
cint() 'for integer
clng() 'for long
cdbl() 'for double
 
Alright thank you...so I would put

clng(text1.text)

right?
 
val() also works.....
Trying looking in the Help file, they are all there including the more exotic ones... Troy Williams B.Eng.
fenris@hotmail.com

 
Use of the Val function should be discouraged as far as I am concerned: it doesn't recognize International number formats.
The CFunctions (CInt, Clng, CDbl, ...) use the locale settings to do the conversion job, Val does not have this capability and therefore may not be able to recognize number formats that are used outside the US. _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Good point, rvBasic. I didn't know that, and since I've run into problems with international formats before, it's nice to know in advance for once. ;)
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
 
Really Really Great Tip rvBasic...
That was one of my greatest problem...

10q alot...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top