Solved

For gcs001

Posted on 2000-04-03
5
147 Views
Last Modified: 2010-05-02
From dosyl.
0
Comment
Question by:dosyl
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:gcs001
ID: 2681037
Hi dosyl,
What's the question?
0
 
LVL 1

Author Comment

by:dosyl
ID: 2681197
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
 
LVL 4

Expert Comment

by:gcs001
ID: 2681531
Thanks dosyl, much appreciated.

You could also look at the Format function - it is more flexible.
0
 
LVL 1

Author Comment

by:dosyl
ID: 2682077
Can you write Cdbl(Val(Text1.Text)) with the format function?
0
 
LVL 4

Accepted Solution

by:
gcs001 earned 50 total points
ID: 2683255
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question