Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display decimals in a msgbox
Sub formatmsgbox()
vamp = ActiveCell MsgBox "There is a difference of " & Format(vamp, "#,###.00") End Sub -- Don Guillett SalesAid Software "JT" wrote in message ... If certain conditions are met, a message is displayed to the user with the following code" MsgBox ("There is a difference of " & " (" & vamt & ") " & " for " & vWorker, vbCritical, "Amount Difference" The issue I would like to display the variable vamt as 5.00 or 5.10 or 5.12; whatever the amount is in the message box. If the amount is 5.00, it is being displayed as (5) in the msgbox. In the spreadsheet where the amount comes from, it is displayed as 5.00 in the Excel spreadsheet but the amount in the formula bar is 5. Is there a way to format this variable to 2 decimals places so it is dispalyed as 5.00 in the msgbox? Thanks for the help. Any ideas or suggestions are greatly appreciated. -- JT |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to display remaining txt file which overflowed MsgBox display? | Excel Discussion (Misc queries) | |||
How do I get excel to display zeros at the end of my decimals? | Excel Discussion (Misc queries) | |||
How do I display exact fractions instead of decimals? | Excel Discussion (Misc queries) | |||
MsgBox Display | Excel Programming | |||
Display of $ in Msgbox | Excel Programming |