Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PCH PCH is offline
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I format a MSGBOX to show text and variables in a macro? Pank New Users to Excel 4 March 22nd 07 01:10 PM
Validate MsgBox Entry to Data in Cells David Excel Discussion (Misc queries) 13 December 21st 05 10:31 PM
Format of a msgbox scottwilsonx[_72_] Excel Programming 1 November 15th 04 06:35 PM
Custom MsgBox using values from 2 different cells Todd Huttenstine[_3_] Excel Programming 3 November 27th 03 12:49 AM
format values in MsgBox? NorTor Excel Programming 2 September 9th 03 02:26 PM


All times are GMT +1. The time now is 01:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"