Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have the code posted below that on the close workbook event it replaces the toolbars, gridlines etc. that I remove on the workbook_open event. However the only line that doesnt seem to work properly is the "Application.DisplayFormulaBar = True". When I close the workbook I never get my formula bar back and I have to go to options to reset. Can anyone help me in understanding why this is? Many thanks in advance. Martin Here is the code: Sub Workbook_close() Sheets("Main Menu").Activate With ActiveWindow .DisplayGridlines = True .DisplayHeadings = True .DisplayWorkbookTabs = True .DisplayHorizontalScrollBar = True .DisplayVerticalScrollBar = True End With Application.DisplayFormulaBar = True Application.CommandBars("Worksheet Menu Bar").Enabled = True Application.CommandBars("Standard").Enabled = True Application.CommandBars("Reviewing").Enabled = True Application.CommandBars("Formatting").Enabled = True Application.CommandBars("Drawing").Enabled = True Application.CommandBars("Chart").Enabled = True Application.CommandBars("Control Toolbox").Enabled = True End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The only thing I can think of is timing. You might try a delay after or
before the execution line. Or, move that line to the beginning of the macro. "Martin" wrote in message ... Hi, I have the code posted below that on the close workbook event it replaces the toolbars, gridlines etc. that I remove on the workbook_open event. However the only line that doesnt seem to work properly is the "Application.DisplayFormulaBar = True". When I close the workbook I never get my formula bar back and I have to go to options to reset. Can anyone help me in understanding why this is? Many thanks in advance. Martin Here is the code: Sub Workbook_close() Sheets("Main Menu").Activate With ActiveWindow .DisplayGridlines = True .DisplayHeadings = True .DisplayWorkbookTabs = True .DisplayHorizontalScrollBar = True .DisplayVerticalScrollBar = True End With Application.DisplayFormulaBar = True Application.CommandBars("Worksheet Menu Bar").Enabled = True Application.CommandBars("Standard").Enabled = True Application.CommandBars("Reviewing").Enabled = True Application.CommandBars("Formatting").Enabled = True Application.CommandBars("Drawing").Enabled = True Application.CommandBars("Chart").Enabled = True Application.CommandBars("Control Toolbox").Enabled = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_Close Q | Excel Programming | |||
write WorkBook_close event dynamically | Excel Programming |