Consulting

Results 1 to 7 of 7

Thread: Change Tabs in the Ribbon

  1. #1
    VBAX Master
    Joined
    Jun 2006
    Posts
    1,091
    Location

    Change Tabs in the Ribbon

    I know you can't modify the ribbon through VBA but I think I read somewhere that you can Switch to a different tab in the ribbon through VBA. Is this possible because now I can't find it and if it is how do I do it?

    Thank you,
    Daniel

  2. #2
    VBAX Mentor
    Joined
    Dec 2007
    Posts
    462
    Location
    Check this link out I hope it helps,
    http://msdn2.microsoft.com/en-us/library/bb425845.aspx

  3. #3
    VBAX Master
    Joined
    Jun 2006
    Posts
    1,091
    Location
    Trevor,

    Thank you for your help but that isn't what I am looking for, that is how to alter the ribbon with xml. I am trying to change it from the "PivotTable Options" tab on the Ribbon to the "Home" tab on the ribbon. Is this at all possible? I think I read this is about all you can do in VBA with the Ribbon but I can't find that article now.

    Daniel Blois

  4. #4
    VBAX Mentor
    Joined
    Dec 2007
    Posts
    462
    Location
    Im Sure you can do what you are trying to do, but, I don't understand "PivotTable Options", what is that? , I know when you hit the ribbon it drops down a 2 colume list), the home tab I might have seen that( I don't have 2007 installed right now so I'm working from meemory, I have 03 installed

  5. #5
    VBAX Master
    Joined
    Jun 2006
    Posts
    1,091
    Location
    Pivot Table Options is a contextual tab that is shown when you are inside of a pivot Table in Excel 2007. I want to allow my users to choice what tab they end up in when the report is done running.

  6. #6
    VBAX Mentor
    Joined
    Dec 2007
    Posts
    462
    Location
    I have a guess, try seach access help files for setfocus to tabed db tabs and I believe that is the concept your looking for, but to get the names for the exell contexual tabs that may require some internet searching or you could go in to access once again and in the code section add a reference to excell 07 and look at the file contents witch will tell you the tab names and then you can go back to excel with that info.
    note this is off the top of my head on how to get the info your looking for or try googling "Excell 2007 tabs VBA"

  7. #7
    VBAX Mentor
    Joined
    Dec 2007
    Posts
    462
    Location
    http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx
    this covers add/changing tab names, I think this may help you with the sample code as how the tabs are refferd to just [tabname].setfocus or [tabname[.setfocus = True

Posting Permissions

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