Can't get Ribbon to show after hiding it using VBA on workbook open

Diffus

New Member
Joined
Dec 11, 2015
Messages
20
My goal is to have a screen as nearly free of anything Excel-related when the workbook opens, then to have everything set back to normal upon the clicking of a Continue button on that screen.

Here's the code I am using. HdeStuff is called on workbook open; continue is executed by clicking on a button on the screen.

Sub HideStuff()
Sheets("Splash").Select
Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayGridlines = False
End Sub

Sub Continue()
Sheets("Splash").Select
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFullScreen = True
Application.DisplayFormulaBar = True
ActiveWindow.DisplayWorkbookTabs = True
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayGridlines = True
Sheets("Input").Select
End Sub

When the user is sent to the Input sheet, though, the Ribbon is still hidden. I suppose I could use a dialogue box to prompt the user to press CTRL-F1, or double-lcik at the top of the sheet. But I would rather have it done automatically.

What's the secret?

(Yes, I am aware of the UserForm approach to a splash screen. I'd like to do it this way. And the SHOW TOOLBAR command doesn't work whether it's at the beginning or end of the macro.

Thanks for any suggestions.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You're messing with Excel v 4.0 Menus?
Maybe you should use SENDKEYS instead.
 
Upvote 0
You're messing with Excel v 4.0 Menus?
Maybe you should use SENDKEYS instead.

It's what turned up in a Google search. I'm sure this has been addressed before, but I can't quite figure out the appropriate Google search string.
 
Upvote 0
Found this:

<code class="code-1 nolinks" id="code-20-39698664-1"> Application.SendKeys "^{F1}"

It doesn't do anything except launch a new tab and URL in my browser.
</code>
 
Upvote 0
Got it:

In Continue,
Application.DisplayFullScreen = True
should be
Application.DisplayFullScreen = False.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top