#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Msgbox help

I am trying to return a value to a msgbox, but instead of just the
actual value, I want the number to be formatted as fixed (i.e. using
"," as thousand seperator and only 2 decimal places).

My code so far is (and NAP is a named range in my worksheet):

_________

Dim getNAP
Dim msgA

getNAP = Range("NAP")

msgA = MsgBox("The final valuation is " & getNAP)
__________


This works fine, except I want the msgbox to show "The final valuation
is 19,352,654.23" instead of "The final valuation is 19352654.231432"


Thanks for the help.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Msgbox help

I am trying to return a value to a msgbox, but instead of just the
actual value, I want the number to be formatted as fixed (i.e. using
"," as thousand seperator and only 2 decimal places).


MsgBox("The final valuation is " & Format(getNAP, "##,##0.00"))

HTH,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Msgbox help

Thanks, works perfectly...


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
MsgBox CC Excel Discussion (Misc queries) 4 May 5th 06 05:45 PM
msgbox James Coughlan Excel Discussion (Misc queries) 3 May 3rd 06 01:57 PM
Msgbox Bernd[_2_] Excel Programming 0 October 24th 03 10:20 AM
MsgBox redmad Excel Programming 1 August 1st 03 12:18 AM
MsgBox Dave Peterson[_3_] Excel Programming 0 July 23rd 03 02:11 AM


All times are GMT +1. The time now is 11:04 PM.

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"