Msg Box Question

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hello,
I like to write a code to appear the
below message in the message box window.

Total profit is = Range(A1)-Range(A2)-Range(A3)
Total loss is = Range(B1)-Range(B2)-Range(B3)

The message can appear as a single line or more.

Thanks.
 
John,

Do you mean

MsgBox "Total profit is = " & Range("A1") - Range("A2") - Range("A3") &
vbCrLf & _
"Total loss is = " & Range("B1") - Range("B2") -
Range("B3")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top