Thread: Workbook_close
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin Martin is offline
external usenet poster
 
Posts: 336
Default Workbook_close

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