VB Currency

Posted on 2003-03-12
Medium Priority
Last Modified: 2010-04-07
Wondering if anyone can help I have a lbl that generates a total from 2 other lbls, heres the problem I have a cmdpost that post the total into a total lbl but that lbl has to display the number in a currency form like $XXX.XX. Its the same number in the first total lbl but in the other total lbl it has to be in currency
Question by:4Merlin4
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
LVL 18

Expert Comment

ID: 8124122
lblCurrency.caption = Format(243412345.5234, "$0,000.00")

Expert Comment

ID: 8124157
or simply
lbltotal = Format(lbl, "currency")

Author Comment

ID: 8124187
that helps but the lbltotal has to keep a running total the addition just doesn't happen once it can happen multiple times
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 18

Accepted Solution

bobbit31 earned 500 total points
ID: 8124193
just call format anytime you change the caption of the label.

Expert Comment

ID: 8124203
lbltotal = Format(val(lblFirst) + val(lblSecond), "currency")
LVL 11

Expert Comment

ID: 8124217
lblSum.caption = Format(val(format(lblCur1.catpiton)) + val(format(lblCur2.caption)), "Currency")

Format will get rid of "$" sign and convert to a number

Good Luck!

Expert Comment

ID: 8900189
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 9664580
Moderator, my recommended disposition is:

    Accept bobbit31's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

752 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