For gcs001

From dosyl.
LVL 1
dosylAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
gcs001Connect With a Mentor Commented:
To convert Text1.Text to a Currency value you can try:
Format(Text1.Text), "Currency")

or if you want to first convert it to a Double and then to a Currency try:
Format(CDbl(Val(Text1.Text)), "Currency")

Both should work.

Regards,
Grant.
0
 
gcs001Commented:
Hi dosyl,
What's the question?
0
 
dosylAuthor Commented:
It was only to give you some points for the question:
http://experts-exchange.com/Computers/Programming/Windows/Visual_Basic/Q_10321311.html
In passing, is it the best way to convert a String in Currency: cdbl(val(Text1.text)).
0
 
gcs001Commented:
Thanks dosyl, much appreciated.

You could also look at the Format function - it is more flexible.
0
 
dosylAuthor Commented:
Can you write Cdbl(Val(Text1.Text)) with the format function?
0
All Courses

From novice to tech pro — start learning today.