Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I need a sub procedure that identifies all active Menu Bars when opening a workbook. - Then store the ID - disable all found Menus - active a customized Menu (That works already) before closing Workbook: - disable customized Menu (That works already) - enable alle menus that was active in the beginning I tried something with .findcontrols but I coudn't get it running. Thanks!! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() This isn't an exact answer to you question, but maybe it can be adapted for your purpose? I have since adapted to store in a worksheet array rather tha in a global array, but that code is at work and I will be away from work for several weeks. See the following: http://www.excelforum.com/showthread.php?t=497189 -- DCSwearingen Getting old, but love computers. ------------------------------------------------------------------------ DCSwearingen's Profile: http://www.excelforum.com/member.php...o&userid=21506 View this thread: http://www.excelforum.com/showthread...hreadid=568775 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Matz" wrote in message ... Hi, I need a sub procedure that identifies all active Menu Bars when opening a workbook. - Then store the ID - disable all found Menus - active a customized Menu (That works already) before closing Workbook: - disable customized Menu (That works already) - enable alle menus that was active in the beginning I tried something with .findcontrols but I coudn't get it running. Thanks!! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hey Bob
you are great! Perfect - just copy paste.... Thanks for the sunday highlight in VBA :-) Matz "Bob Phillips" wrote: 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 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Matz" wrote in message ... Hi, I need a sub procedure that identifies all active Menu Bars when opening a workbook. - Then store the ID - disable all found Menus - active a customized Menu (That works already) before closing Workbook: - disable customized Menu (That works already) - enable alle menus that was active in the beginning I tried something with .findcontrols but I coudn't get it running. Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete custom menu bars | Setting up and Configuration of Excel | |||
Disappearing Tool and menu bars | Excel Discussion (Misc queries) | |||
Lost all my menu bars and tool bars | Excel Discussion (Misc queries) | |||
How do I restore my menu and tool bars in Excell? | Excel Discussion (Misc queries) | |||
I have lost my menu bars in Excel? | Excel Discussion (Misc queries) |