List of text in a message box arranged in rows

  • Thread starter Thread starter Moises
  • Start date Start date
M

Moises

I need to create a message that is activated with a macro, in the message I
need to put a listo of items organised by rows, for example "

Inventory Control - WH1 - INFO
Item 1
Item 2
Item 3
..
..

OK

How do I have to wite the code in the message box :
MsgBox "Item 1", vbMsgBoxRtlReading, "MMR"

to include the other rows and they are displayed in rows on the screen ?
 
Withe your items in ColA from row2 to row10 try the below macro....Adjust to
suit

Sub Macro1()

Dim lngRow As Long
Dim strMessage As String
For lngRow = 2 To 10
If Trim(Range("A" & lngRow)) <> "" Then _
strMessage = strMessage & vbLf & Range("A" & lngRow)
Next
MsgBox strMessage

End Sub
 
Back
Top