Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dim dim is offline
external usenet poster
 
Posts: 123
Default Making a [semi] Dictator Application: Hiding Main Command Bar?

Hi all,

I have included a variety of elements in my auto-open macro to hide shortcut
bars and such, and I just added in Application.ShowWindowsInTaskbar =
False....anyway...I want to also hide the main command bar that has the File,
Edit, View, Insert, Format, Tools etc drop down menus at the top of my Excel
program window. I dont need to replace these with my own, so I don't need to
know how to do that right now....just the VBA code to hide it. How do I hide
it?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Making a [semi] Dictator Application: Hiding Main Command Bar?

Try

Application.CommandBars("Worksheet Menu Bar").Enabled = False


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"dim" wrote in message
...
Hi all,

I have included a variety of elements in my auto-open macro to hide
shortcut
bars and such, and I just added in Application.ShowWindowsInTaskbar =
False....anyway...I want to also hide the main command bar that has the
File,
Edit, View, Insert, Format, Tools etc drop down menus at the top of my
Excel
program window. I dont need to replace these with my own, so I don't need
to
know how to do that right now....just the VBA code to hide it. How do I
hide
it?

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
dim dim is offline
external usenet poster
 
Posts: 123
Default Making a [semi] Dictator Application: Hiding Main Command Bar?

ARGH!!! That worked...thanks....now its gone whenever I open Excel and I cant
get it back! :-(

Is there a shortcut key to get into VBA code when opening a program so I can
change it back?

.....oops! :-o
  #4   Report Post  
Posted to microsoft.public.excel.programming
dim dim is offline
external usenet poster
 
Posts: 123
Default Making a [semi] Dictator Application: Hiding Main Command Bar?

Never Mind....I found it! Alt + F11

That was embarrasing! :-)

Thanks again!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Making a [semi] Dictator Application: Hiding Main Command Bar?

Alt + F11 wil open the VB Editor so you can change the code.

To just get the worksheet menu back..............

ViewImmediate Window copy this into the window and hit Enter key

Application.CommandBars("Worksheet Menu Bar").Enabled = True

BTW.......you should always revert to default when you close the workbook.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Caption = ""
ActiveWindow.Caption = ""
With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
With Application
.CommandBars("Worksheet Menu Bar").Enabled = True
.DisplayFormulaBar = True
.DisplayStatusBar = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
End With
End Sub


Gord

On Mon, 7 Jan 2008 14:57:02 -0800, dim wrote:

ARGH!!! That worked...thanks....now its gone whenever I open Excel and I cant
get it back! :-(

Is there a shortcut key to get into VBA code when opening a program so I can
change it back?

....oops! :-o


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
Dictator App Gary Brown[_4_] Excel Discussion (Misc queries) 2 October 28th 08 04:49 PM
Making a [semi] Dictator Application: Hiding Main Command Bar? dim Excel Discussion (Misc queries) 4 January 7th 08 11:38 PM
How to elegantly end a main procedure from a userform command button? [email protected] Excel Programming 1 August 2nd 06 11:54 PM
hiding application Chip Smith Excel Discussion (Misc queries) 1 April 1st 06 09:53 AM
Making Semi-Colon Delimited Fields Dave DJ Excel Programming 1 March 5th 04 02:36 PM


All times are GMT +1. The time now is 10:19 PM.

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

About Us

"It's about Microsoft Excel"