ToolBar Hidden via VBA, cannot unshare workbook

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
597
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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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