Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default How to hide Excel's Top Menu Bar

On occasions, I need to display a single page (of a multiple page
spreadsheet) full-screen without any embellishment.

My code for the relevant sheet is appended at the end of this post, with
Application.DisplayFullScreen = True and ActiveWindow.DisplayWorkbookTabs =
False doing the "work". This almost gives me what I want, except that the
top level menu bar (FILE, EDIT, VIEW, INSERT, FORMAT, TOOLS, DATA, WINDOW,
HELP) remains - and is needed at all other times. Is there a VBA method to
hide this unwanted item?

Option Explicit
Private Sub Worksheet_Activate()
Application.OnKey "{F5}", "TypeF5" ' PREVIOUS QUESTION
Application.OnKey "{F6}", "TypeF6" ' NEXT QUESTION

Application.DisplayFullScreen = True
ActiveWindow.DisplayWorkbookTabs = False

End Sub

Private Sub Worksheet_Deactivate()
Application.OnKey "{F5}"
Application.OnKey "{F6}"

Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True

End Sub








  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default How to hide Excel's Top Menu Bar

CommandBars(1).Enabled = False

--

Vasant

"Hotbird" wrote in message
...
On occasions, I need to display a single page (of a multiple page
spreadsheet) full-screen without any embellishment.

My code for the relevant sheet is appended at the end of this post, with
Application.DisplayFullScreen = True and ActiveWindow.DisplayWorkbookTabs

=
False doing the "work". This almost gives me what I want, except that the
top level menu bar (FILE, EDIT, VIEW, INSERT, FORMAT, TOOLS, DATA, WINDOW,
HELP) remains - and is needed at all other times. Is there a VBA method

to
hide this unwanted item?

Option Explicit
Private Sub Worksheet_Activate()
Application.OnKey "{F5}", "TypeF5" ' PREVIOUS QUESTION
Application.OnKey "{F6}", "TypeF6" ' NEXT QUESTION

Application.DisplayFullScreen = True
ActiveWindow.DisplayWorkbookTabs = False

End Sub

Private Sub Worksheet_Deactivate()
Application.OnKey "{F5}"
Application.OnKey "{F6}"

Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True

End Sub










  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to hide Excel's Top Menu Bar

Hotbird

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

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

Gord Dibben XL2002

On Thu, 27 Nov 2003 01:03:37 -0000, "Hotbird" wrote:

On occasions, I need to display a single page (of a multiple page
spreadsheet) full-screen without any embellishment.

My code for the relevant sheet is appended at the end of this post, with
Application.DisplayFullScreen = True and ActiveWindow.DisplayWorkbookTabs =
False doing the "work". This almost gives me what I want, except that the
top level menu bar (FILE, EDIT, VIEW, INSERT, FORMAT, TOOLS, DATA, WINDOW,
HELP) remains - and is needed at all other times. Is there a VBA method to
hide this unwanted item?

Option Explicit
Private Sub Worksheet_Activate()
Application.OnKey "{F5}", "TypeF5" ' PREVIOUS QUESTION
Application.OnKey "{F6}", "TypeF6" ' NEXT QUESTION

Application.DisplayFullScreen = True
ActiveWindow.DisplayWorkbookTabs = False

End Sub

Private Sub Worksheet_Deactivate()
Application.OnKey "{F5}"
Application.OnKey "{F6}"

Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True

End Sub








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default How to hide Excel's Top Menu Bar

Many thanks Gord and Vasant. Your solutions worked like a dream. What a
resource this NewsGroup is!!!

<Gord Dibben wrote in message
...

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

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

Gord Dibben XL2002

CommandBars(1).Enabled = False

--

Vasant


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to hide Excel's Top Menu Bar

Thanks Hotbird

Great to get feedback.

These newsgroup are definitely a great resource.

Gord

On Thu, 27 Nov 2003 21:49:04 -0000, "Hotbird" wrote:

Many thanks Gord and Vasant. Your solutions worked like a dream. What a
resource this NewsGroup is!!!

<Gord Dibben wrote in message
.. .

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

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

Gord Dibben XL2002

CommandBars(1).Enabled = False


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 do i hide & unhide menu bar? prakash Excel Discussion (Misc queries) 1 November 12th 08 06:05 AM
Hide bar above menu titles Johnny J Woodhouse[_2_] Excel Discussion (Misc queries) 3 October 15th 07 03:30 PM
excel's menu bar rosa Excel Discussion (Misc queries) 3 July 30th 07 03:40 AM
How do I hide the Worksheet menu bar Chris Excel Worksheet Functions 1 May 20th 06 11:14 AM
Truncated font list in Excel's "Insert Symbol" menu selection OCM Excel Discussion (Misc queries) 1 February 13th 06 03:49 AM


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