View Full Version : Change Tabs in the Ribbon

02-08-2008, 02:02 PM
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,

02-08-2008, 06:38 PM
Check this link out I hope it helps,

02-12-2008, 09:22 AM

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

02-13-2008, 05:40 PM
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

02-14-2008, 10:18 AM
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.

02-14-2008, 01:29 PM
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"

02-14-2008, 01:32 PM
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