LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Closing Code


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.


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=501214

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resume.xlw and closing workbook with VBA code. BruceS Excel Discussion (Misc queries) 6 November 4th 06 08:19 PM
Opening and Closing workbooks in code Francis Brown Excel Programming 4 November 26th 05 02:11 PM
Error when closing workbooks after running .net code Stefan Hojnowski Excel Programming 1 August 6th 05 04:16 AM
Closing the VBA Editor using code Bony_Pony Excel Worksheet Functions 1 March 7th 05 08:14 PM
[HELP] closing a program with VBA code Andr? Palmela Excel Programming 2 October 21st 04 05:47 PM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"