Microsoft Office Tutorials and References
In Depth Information
The VBA MsgBox Function
Figure 12-7: This message box displays text with tabs and line breaks.
Sub ShowRange()
Dim Msg As String
Dim r As Integer, c As Integer
Msg = “”
For r = 1 To 12
For c = 1 To 3
Msg = Msg & Cells(r, c).Text
If c <> 3 Then Msg = Msg & vbTab
Next c
Msg = Msg & vbCrLf
Next r
MsgBox Msg
End Sub
Chapter 15 includes a UserForm example that emulates the MsgBox function.
 
Search JabSto ::




Custom Search