+ Reply to Thread
Results 1 to 4 of 4

UserForm Listbox Add Worksheets with If Check

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    UserForm Listbox Add Worksheets with If Check

    Hi working to activate my userform listbox with a list of all worksheets except certain named ones. This is what I have so far...

    Please Login or Register  to view this content.
    I'm getting an type mismatch error on "If ws.Name <> "SheetName1" Or "Sheet2" Or "This_Sheet Then"

    How do I specify which sheets to exclude?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: UserForm Listbox Add Worksheets with If Check

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: UserForm Listbox Add Worksheets with If Check

    thank u. that works. is it possible to do that in an If statement though? why didn't the original one work?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: UserForm Listbox Add Worksheets with If Check

    This is what the If would look like.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1