I get 'Error 424: Object required', and I can´t figure out why. I have a listbox named ListBoxforPrint in the Worksheet (not a userform). SmainMenu is the CodeName of the sheet. Can you please help? Tx
Sub PrintSelected() 'Print the selected sheets from a multiSelect listbox
Dim i As Long
Dim Msg As String
delOldPrintList
listNo = 1
SMainMenu.Activate
With SMainMenu.ListBoxforPrint
For i = 0 To .ListCount - 1
If .Selected(i) Then
listNo = listNo + 1
SSysSheet.Cells(listNo, 6).Value = .List(i)
MyShName = SSysSheet.Cells(listNo, 6).Value
Worksheets(MyShName).PrintOut
End If
Next i
End With
If listNo = 1 Then
Msg = "No items selected to print"
MsgBox Msg
End If
End Sub