Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting data in Msg


Hi,

Have the error message working okay but the result is always rounded to
whole dollars.

Tills, bank and variance refer to named fields within the spreadsheet.

e.g. tills = Sheets("Tempdata").Range("Tilltotal").Value


Code for error message itself :

'Building the VARIANCE error message
Msg = "TILLS total :" & vbTab & Format(tills, "$##,##0.00")
Msg = Msg & vbCrLf & "BANK total :" & vbTab & Format(bank,
"$##,##0.00")
Msg = Msg & vbCrLf & vbCrLf & " "
Msg = Msg & vbCrLf & "Variance :" & vbTab & Format(variance,
"$##,##0.00")
Msg = Msg & vbCrLf & vbCrLf & " "
Msg = Msg & vbCrLf & "Do you wish to proceed and SAVE the amounts
entered?"

'Display the result and prompt for 'proceed' or 'review' amounts
Answer = MsgBox(Msg, vbYesNo, "Takings Validation")
If Answer = vbYes Then
GoTo ValidData

Cheers,
Bernz


--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=465760

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting data in Msg


After playing around myself I found the solution.

I had

Dim As Integer

Changed to

Dim As Currency

Thanks anyway.

Cheers,
Bernz


--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=465760

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
Formatting ALL data labels for ALL data series at once Vasco Charts and Charting in Excel 8 April 3rd 23 02:41 PM
Formatting data series - line between certain data points only alan_m Charts and Charting in Excel 0 September 20th 07 05:16 PM
Formatting Rows of Data based on Column Data mwmasch Excel Worksheet Functions 3 July 24th 07 04:36 PM
How can I cut data out of HTML table, into msExcel and just take the data & columns? (but NOT the formatting & URLs!) ship Excel Discussion (Misc queries) 24 April 25th 06 06:02 PM
Formatting Data Mohamed AlKhatib Excel Programming 1 April 1st 05 07:25 PM


All times are GMT +1. The time now is 12:06 PM.

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

About Us

"It's about Microsoft Excel"