You are on page 1of 1

On Error Resume Next

Sub Sample1()
Dim i As Long, buf As String
On Error Resume Next
For i = 1 To 4
buf = buf & Worksheets(i).Name & vbCrLf
Next i
MsgBox buf
End Sub

You might also like