View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default 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)