Solved

For gcs001

Posted on 2000-04-03
5
155 Views
Last Modified: 2010-05-02
From dosyl.
0
Comment
Question by:dosyl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: 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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month5 days, 8 hours left to enroll

627 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