• Select Excel Tab (2003)

    Author
    Topic
    #451989

    How can I select the tab to the right of the active tab via VBA?

    Viewing 1 reply thread
    Author
    Replies
    • #1114474

      Hmmm…it was moved from the Access forum.

      I will be selecting the tab FROM Access, not from Excel.

      Not sure if it makes much difference…

      • #1114478

        I moved your post here from the Access forum because even though you want to do it from Access, you’ll be using Excel VBA to do it.

    • #1114475

      If you have an Excel application object objXL, you can use

      objXL.ActiveSheet.Next.Select

      But in many situations it isn’t necessary to activate or select a tab. You can also use code like this:

      Dim objWsh As Excel.Worksheet
      Set objWsh = objXL.ActiveSheet.Next

      You can then refer to cells on objWsh even though it isn’t the active sheet.

    Viewing 1 reply thread
    Reply To: Select Excel Tab (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: