Hi working to activate my userform listbox with a list of all worksheets except certain named ones. This is what I have so far...
I'm getting an type mismatch error on "If ws.Name <> "SheetName1" Or "Sheet2" Or "This_Sheet Then"![]()
Private Sub UserForm_Activate() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Name <> "SheetName1" Or "Sheet2" Or "This_Sheet Then ListBox.AddItem (ws.Name) End If Next ws End Sub
How do I specify which sheets to exclude?
Bookmarks