Microsoft Office Tutorials and References
In Depth Information The Form's Initialize event
bNoneSelected = True
If cSheets = 0 Then
MsgBox "No sheets in this workbook.", vbExclamation
Exit Sub
For i = 0 To lstSheets.ListCount - 1
If lstSheets.Selected(i) Then
bNoneSelected = False
' List box is 0-based, arrays are 1-based
ActiveWorkbook.Sheets(sSheetNames(i + 1)).PrintOut
End If
End If
If bNoneSelected Then
MsgBox "No
sheets have been selected from the list box.", vbExclamation
End If
End Sub
Search JabSto ::

Custom Search