Link to home
Start Free TrialLog in
Avatar of brothertruffle880
brothertruffle880Flag for United States of America

asked on

Excel VBA 2013 - How to format a variable before displaying it in a MsgBox

I would like to have the value in GTotal formatted as currency with two decimal places.
Do I get this done with a command in the procedure? Or some other way.

Gtotal = 95000.34
MsgBox ("The total sales amount for sales is $" & GTotal)
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

It should do that without any changes.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brothertruffle880

ASKER

Works perfectly. Thanks!
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2016