Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Enable to hide Worksheet Menu Bar

I have the following code in the ThisWorkbook (excel 2007), it works exactly
the way I want at the initial launch of the program. But once I minimize the
program and turn it back on the toolbar reappear. Is this a bug or something
wrong with my code? Please help.


Private Sub Workbook_Activate()
Call RemoveToolbars
End Sub

Private Sub Workbook_Deactivate()
Call RestoreToolbars
End Sub

Private Sub RemoveToolbars()
On Error Resume Next
With Application
.DisplayFullScreen = True
.CommandBars("Full Screen").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
End With
On Error GoTo 0
End Sub

Private Sub RestoreToolbars()
On Error Resume Next
With Application
.DisplayFullScreen = False
.CommandBars("Worksheet Menu Bar").Enabled = True
End With
On Error GoTo 0
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Enable to hide Worksheet Menu Bar


Ecel 2007 does not suport CommadBars it uses the Ribbon.


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=74757

Reply
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
How to enable the Unprotected Worksheet menu xx Excel Worksheet Functions 1 May 15th 09 12:50 PM
How can I enable hide functionality for a protected worksheet MariaLegins Excel Programming 0 September 20th 07 07:44 PM
Hide controls in a worksheet menu bar clara Excel Programming 1 March 28th 07 07:08 PM
How do I hide the worksheet menu bar AndyRoo Excel Programming 2 May 30th 06 10:46 AM
How do I hide the Worksheet menu bar Chris Excel Worksheet Functions 1 May 20th 06 11:14 AM


All times are GMT +1. The time now is 02:38 AM.

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"