ToolBar Hidden via VBA, cannot unshare workbook

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
Morning

I have put the following code into the workbook to hide the toolbars etc, and shared the workbook. As its shared the Macros are disabled. I have saved the workbook, but when I have gone to click a button on my spreadsheet which sorts it, it bring up an error. How can I unshared the workbook, or force the spreadsheet to show me the tool bar please?

Code:
 Private Sub Workbook_Open()
 Application.ScreenUpdating = False
 Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"",TRUE)"
 Application.DisplayFormulaBar = False
 Sheets("new multirate").Select
 Application.ScreenUpdating = True

 End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
open your non enabled workbook, then open a new workbook, Alt + f11 into the vbe (in the new workbook) and drop
Code:
Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"",TRUE)"
into the immediate window.

should work.
 
Upvote 0

Forum statistics

Threads
1,216,159
Messages
6,129,210
Members
449,493
Latest member
JablesFTW

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