Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format a Cells value within a MsgBox
How would I format the following values cell values to:
Range("F62").Value "Format Value to #,##0,0" Range("F63").Value "Format Value to $#,##0.00" Dim Msg, Style, Title, Response, MyString Msg = "Are you sure you want to delete Quantities?" & vbCr & vbCr _ & "No of Items:" & vbTab & Range("f61").Value & vbCr _ & "Tonnes:" & vbTab & vbTab & Range("F62").Value & vbCr _ & "Price:" & vbTab & vbTab & "$" & Range("F63").Value " & vbCr ' Define message." Style = vbYesNo + vbExclamation + vbDefaultButton2 ' Define buttons. Title = "Last Chance!!!" ' Define title. Response = MsgBox(Msg, Style, Title) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format a Cells value within a MsgBox
Dim Msg, Style, Title, Response, MyString
Msg = "Are you sure you want to delete Quantities?" & vbCr & vbCr _ & "No of Items:" & vbTab & Range("f61").Value & vbCr _ & "Tonnes:" & vbTab & vbTab & _ Format(Range("F62").Value, " #,##0,0") & vbCr _ & "Price:" & vbTab & vbTab & "$" & _ Format(Range("F63").Value, " #,##0,0.00") & vbCr -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "PCH" wrote in message ... How would I format the following values cell values to: Range("F62").Value "Format Value to #,##0,0" Range("F63").Value "Format Value to $#,##0.00" Dim Msg, Style, Title, Response, MyString Msg = "Are you sure you want to delete Quantities?" & vbCr & vbCr _ & "No of Items:" & vbTab & Range("f61").Value & vbCr _ & "Tonnes:" & vbTab & vbTab & Range("F62").Value & vbCr _ & "Price:" & vbTab & vbTab & "$" & Range("F63").Value " & vbCr ' Define message." Style = vbYesNo + vbExclamation + vbDefaultButton2 ' Define buttons. Title = "Last Chance!!!" ' Define title. Response = MsgBox(Msg, Style, Title) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format a Cells value within a MsgBox
I am not sure if you mean Format the values within the cell or msgbox. Within the msgbox Statement you can use FormatNumber(Range("F62").Value) FormatCurrency(Range("F63").Value,2) Msg = "Are you sure you want to delete Quantities?" & vbCr & vbCr _ & "No of Items:" & vbTab & Range("f61").Value & vbCr _ & "Tonnes:" & vbTab & vbTab & FormatNumber(Range("F62").Value) & vbC _ & "Price:" & vbTab & vbTab & "$" & FormatCurrency(Range("F63").Value,2 " & vbCr -- drawling ----------------------------------------------------------------------- drawlings's Profile: http://www.excelforum.com/member.php...fo&userid=3662 View this thread: http://www.excelforum.com/showthread.php?threadid=57210 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I format a MSGBOX to show text and variables in a macro? | New Users to Excel | |||
Validate MsgBox Entry to Data in Cells | Excel Discussion (Misc queries) | |||
Format of a msgbox | Excel Programming | |||
Custom MsgBox using values from 2 different cells | Excel Programming | |||
format values in MsgBox? | Excel Programming |