Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have created a macro in a worksheet, to disable the menu toolbars etc.
I had also protected the sheet (which I've since removed). The *very* frustrating problem is, any other workbook I open now (either new or existing) prevents me from rightclicking on the mouse to insert rows columns etc. I am presuming it is something to do with the macro I created, which looks like as below, but I want to switch everything off and return back to normal Excel operation when this workbook is closed. Can anyone point me in the right direction - perhaps its an excel option somewhere I simply need to switch off? Option Explicit Private mFormulaBar Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim oCB As CommandBar For Each oCB In Application.CommandBars oCB.Enabled = True Next oCB Application.DisplayFormulaBar = mFormulaBar End Sub Private Sub Workbook_Open() Dim oCB As CommandBar For Each oCB In Application.CommandBars oCB.Enabled = False Next oCB mFormulaBar = Application.DisplayFormulaBar Application.DisplayFormulaBar = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable running of SelectionChange macro when in another macro? | Excel Discussion (Misc queries) | |||
disable user running macro from Tools Macro | Excel Discussion (Misc queries) | |||
unable to record macro | Excel Programming | |||
Unable to run Macro in an Add-in | Excel Worksheet Functions | |||
Disable Macro at open by an external macro | Excel Programming |