MSGBOX that shows cell data

L

LB79

Does anyone know of a way to have a MSGBOX that shows cell data. Fo
example, cells A1 = value A, A2 = value B, A3 = value C. I want th
MSGBOX to then read: "The following letters have been identified: A, B
C".

Appreciate any help on this.

Thank
 
J

Jason Morin

Sub Test()
v1 = Sheets("Sheet1").Range("A1").Value
v2 = Sheets("Sheet1").Range("A2").Value
v3 = Sheets("Sheet1").Range("A3").Value
MsgBox "The following letters have been identified: " _
& v1 & ", " & v2 & ", " & v3 & "."
End Sub

HTH
Jason
Atlanta, GA
 
L

LB79

Jason - thanks for this.
Is there a way to have each cell value on a seperate line in the MSGBO
eg:

The following letters have been identified:
A
B
C

Is there also a way that it will only include cells that contain value
in the message. If i leave A2 and A3 blank it still puts in commas fo
them.

Thank
 
F

Frank Kabel

Hi
try
MsgBox "The following letters have been identified: " _
& v1 & vblf & v2 & vblf & v3
 
Top