Closing Code

B

Brian Matlack

Hi!
I have this code in my ThisWoekbook objects to reset the Excel
aplication before closing. It all seems to work except I do not get the
formula bar displayed as I want.
Why doesn't this code display the formula bar?
[start code]
Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
ActiveWorkbook.Save
ActiveWorkbook.Saved = True
With ActiveWindow
..DisplayHeadings = True
..DisplayOutline = True
..DisplayWorkbookTabs = True
End With
ActiveWindow.DisplayWorkbookTabs = True
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
Application.CommandBars("Formatting").Visible = True
Application.CommandBars("Drawing").Visible = True
Application.CommandBars("Standard").Visible = True
Application.CommandBars("Warranty").Delete
Application.ScreenUpdating = True
End Sub
[end code]
As always any help is greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top