Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good afternoon,
After reading through a number of questions on the newsgroup re. hiding/restoring toolbars and commandbars. I chose the code below to use in my VBA project. The code works find except when a user click on the x button in the top right hand of the workbook. In this instance the workbook closes and the commandbars/toolbars are NOT restored. Does someone know a work around to this problem?? All ideas much appreciated. Option Explicit Private mFormulaBar Private Sub Workbook_Activate() Dim oCB As CommandBar 'Remove commandbars For Each oCB In Application.CommandBars oCB.Enabled = False Next 'RemoveFormulaBar mFormulaBar = Application.DisplayFormulaBar Application.DisplayFormulaBar = False End Sub Private Sub Workbook_Deactivate() Dim oCB As CommandBar 'Restore commandbars For Each oCB In Application.CommandBars oCB.Enabled = True Next 'RestoreFormulaBar Application.DisplayFormulaBar = mFormulaBar End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Restoring | Excel Discussion (Misc queries) | |||
Removing/restoring toolbars | Excel Programming | |||
Removing and Restoring Excel toolbars | Excel Programming | |||
Restoring Toolbars and Other Things | Excel Programming | |||
Restoring Toolbars | Excel Programming |