98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Number format in msgbox
Number format in msgbox
Resolved · Low Priority · Version 2003
Oliver has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Number format in msgbox
How can you format numbers in the msgbox?
RE: Number format in msgbox
Hi Oliver
Thank you for your question
You can format numbers using the vb FORMAT function.
For example the following code can be used to format a number in a message box so that it has a comma thousand separator and 2 decimal places
Dim intNumber As Integer
intNumber = 1232.3
MsgBox Format(intNumber, "##,##0.00")
The function can also be used to format dates. You can find more info by using the vb help tool
Regards
Stephen
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Deleting cells, Rows & columnsplace your cursor on a cell, row number or column letter and use CTRL + -. |