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

If your cells are already formatted as currency, you could use the .text
property to return that same format.

Sub Demo()
Dim s As String
s = "Total Profit: " & _
[A1].Text & _
vbLf & vbLf & _
"Total Loss: " & _
[B1].Text

MsgBox s, vbInformation, "Profit / Loss"
End Sub


--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"John" wrote in message
...
I want the message box window to appear with the
the following lines.

The total profit is = Range.value(A1)

The total loss is= Range.value(B1)

Is it possible to combine both messages
in single statement.




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



All times are GMT +1. The time now is 09:20 AM.

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"