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: 26
Default Stubborn Excel Options

I have adopted some code I received from this forum to create a personalized
toolbar, hide all menus and other toolbars, as well remove the formula bar,
worksheet tabs, and column/row headings.

The code runs in the ThisWorkbook module in both the WindowActivate and
WindowDeactivate events. It works fine flipping between the application and
other Excel files, but refuses to turn the formula bar, worksheet tabs, and
column/row headings back on when I close the file.

I tried including the code in a BeforeClose event, but that doesn't make a
difference. The formula bar, worksheet tabs, and column/row headings will
only turn on via the Tools Options menu. Have I corrupted something or is
this a "quirk" of Excel?

Below is my code:
----------------------------------------------------
Private Sub Workbook_Windowactivate(ByVal Wn As Excel.Window)

Application.ScreenUpdating = False
Call CreateMenubar
UserToolBars (xlOn)

With ActiveWindow
.DisplayWorkbookTabs = False
.DisplayHeadings = False
End With

With Application
.DisplayFormulaBar = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.ScreenUpdating = True
End With

End Sub
----------------------------------------------------
Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window)

Application.ScreenUpdating = False
Call RemoveMenubar
UserToolBars (xlOff)

With ActiveWindow
.DisplayWorkbookTabs = True
.DisplayHeadings = True
End With

With Application
.DisplayFormulaBar = True
.CommandBars("Worksheet Menu Bar").Enabled = True
.ScreenUpdating = True
End With

End Sub
 
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
Stubborn cell formatting. m_joy Excel Worksheet Functions 1 September 27th 09 06:23 PM
Stubborn Date Format OrientalPearl Excel Programming 12 April 4th 06 05:42 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
stubborn macro josie Excel Programming 2 September 28th 04 02:07 PM


All times are GMT +1. The time now is 10:26 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"