Custom ribbon & Excel VBA : Opening backstage

Does anyone know how to open the Backstage / 'File' tab automatically on open ?

I have tried an Excel file with no ribbon (to see if Excel would default to the backstage view with nothing to show).

I cannot use vba to switch tabs since I don't know the control ID of the 'File' tab. The MS list of controls in Excel 2010 does not document it.

I have even tried
SendKeys "%F"

Open in new window

but that will not work either.
LVL 3
AL_XResearchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gowflowCommented:
Hi
May I ask first what you need to show the file tab ?? what is the menu you want to access ?

then


I cannot use vba to switch tabs since I don't know the control ID of the 'File' tab. The MS list of controls in Excel 2010 does not document it.

I cannot use VBA to switch tab what is the final menu you want to access or what is exactly the thing you want to do ?

gowflow
0
AL_XResearchAuthor Commented:
Hi 'gowflow'. I am creating a bespoke Excel director-style application that completely suppresses Excel's ribbon and replaces it with one I have created. That is all fine. I have replaced the ribbons and all the controls in backstage.

When my addin opens (the 'application') I will show no ribbon until the user logs onto the connected database system. Again that is no problem. The logon button is on the backstage portion of the ribbon and so I want the backstage to automatically open as soon as Excel does (i.e. when the addin file is double-clicked).
0
Rory ArchibaldCommented:
I don't believe there is anything within the Ribbon schema or using RibbonUI that would allow that (activatetab/activatetabmso won't work since it's not really a tab). It might be possible using the Office Accessibility objects but I've never really looked at that in enough detail.
0
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

AL_XResearchAuthor Commented:
hmmm I suspected as much. I was wondering if there was some 'undocumented feature' or tick I had missed.
0
gowflowCommented:
on my part I added a test on the worksheet_selectionchange event and added these 2 lines

ActiveSheet.Activate
SendKeys "%F"

and what it does it show you for a split second the file menu which disappear afterward. it seems that when the event finishes it select or go focus on the cell and the menu disappear again. I was not able to get it to show till user clicks on a menu.

gowflow
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AL_XResearchAuthor Commented:
Thanks gowflow

Anyone else have any other thoughts ?
0
gowflowCommented:
do you have the same problem does it show a split second then disappear ? am stil trying to get help on this.
gowflow
0
AL_XResearchAuthor Commented:
gowflow: your suggested code opened backstage but with the key accelerator labels for each control  

For me the following code shows backstage and keeps it open:
    ActiveSheet.Activate
    SendKeys "%F%"

Open in new window

The final '%' cancels the initial press of 'Alt' - just as you would do with the keyboard.
0
gowflowCommented:
So here you are you have your solution there or I am mistaken ????
gowflow
0
AL_XResearchAuthor Commented:
Although gowflow's code put me on the right track it was my amendment that actually made the code work as needed.
0
gowflowCommented:
Tks for your points and appreciation. Glad I could help.
gowflow
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.