E
emerging_markets
I have a pretty basic macro, at the end of which will be the appearance
of a couple of "information only" message boxes, written as follows:
Msg = Application.UserName & " some text here " & (Range("Rreal").Value
/ 1000) & " more text here " & Range("NPV").Value & " further text
here"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then MsgBox " some explanatory text here if answer
yes "
If Ans = vbYes Then MsgBox " some explanatory text here if answer
no "
Msg = " some text here " & Application.UserName & " more text here
" & (Range("IRR").Value / 1000) & " further text here " &
(Range("Rreal").Value / 1000) & "?"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then MsgBox " some explanatory text here if answer no
"
If Ans = vbYes Then MsgBox " some explanatory text here if answer
yes "
My problem is the ( Rreal / 1000 ) and ( IRR / 1000 ) appear as, say,
0.15 when I want it to appear as 15.0% within the message box text, and
NPV appears as, say, -186845858.3464 when I would want it to appear as
$(186,845,858.35).
Is there any easier way of formatting these numbers within the text of
a message box?
Thanks in advance for any help
Mike
of a couple of "information only" message boxes, written as follows:
Msg = Application.UserName & " some text here " & (Range("Rreal").Value
/ 1000) & " more text here " & Range("NPV").Value & " further text
here"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then MsgBox " some explanatory text here if answer
yes "
If Ans = vbYes Then MsgBox " some explanatory text here if answer
no "
Msg = " some text here " & Application.UserName & " more text here
" & (Range("IRR").Value / 1000) & " further text here " &
(Range("Rreal").Value / 1000) & "?"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then MsgBox " some explanatory text here if answer no
"
If Ans = vbYes Then MsgBox " some explanatory text here if answer
yes "
My problem is the ( Rreal / 1000 ) and ( IRR / 1000 ) appear as, say,
0.15 when I want it to appear as 15.0% within the message box text, and
NPV appears as, say, -186845858.3464 when I would want it to appear as
$(186,845,858.35).
Is there any easier way of formatting these numbers within the text of
a message box?
Thanks in advance for any help
Mike