ToolBar Hidden via VBA, cannot unshare workbook

surkdidat

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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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