Results 1 to 3 of 3

Thread: Excel and Errors

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Dublin
    Posts
    30
    I can open an Excel file no problem.
    I can activate a specific tab in the Excel file no problem.

    I want to check for the tabs existence before I try to activate it to prevent an error occuring.

    Does any body know the correct syntax?

    The following works (unless the tab called 'Test Tab' does not exist);

    Worksheets("Test Tab").Activate

    Thanks

    Graham.

  2. #2
    Fanatic Member VBKNIGHT's Avatar
    Join Date
    Oct 2000
    Location
    Port25
    Posts
    619

    this will read all you tab sheet...
    code:=======================================

    Dim strSheet As Worksheet
    For Each strSheet In Worksheets
    MsgBox strSheet.Name
    Next

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Dublin
    Posts
    30
    Thanks Knight.

    Excellent.

Posting Permissions

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



Click Here to Expand Forum to Full Width