Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Grey bar when menus removed

Hi - Found the code below (somewhere) which alows user to control which menu
bars etc are shown. It also alows me to get rid of blue windows bar at top
of Excel window. This works great on a test xls with nothing in it, but
when I come to apply it to my report system I have set up in XL I get a grey
bar along the top of the screen. The bar covers where the menu items would
have been and also about 8-10mm of the top of the worksheet area itself.

Anyone have any ideas - this would be a great solution if I could get it to
work.

I am using a mixtire of XL 2k and XP (so far only seen the problem in the 2k
version) on Win XP.

Cheers

Andrew

Sub Hide_Everything()

'this hides all commandbars and menus
Dim cBar As CommandBar
For Each cBar In CommandBars
cBar.Enabled = False
Next
'store user settings for later use
'you must have a sheet named "settings"
With ThisWorkbook.Sheets("settings")
.Cells(1, 2).Value = Application.DisplayFormulaBar
.Cells(2, 2).Value = Application.DisplayStatusBar
.Cells(3, 2).Value = ActiveWindow.DisplayHeadings
.Cells(4, 2).Value = ActiveWindow.DisplayHorizontalScrollBar
.Cells(5, 2).Value = ActiveWindow.DisplayVerticalScrollBar
.Cells(6, 2).Value = ActiveWindow.DisplayWorkbookTabs
End With


With Application
'this hides the blue bar at the top
'needs to be ahead of other code that hides stuff
.DisplayFullScreen = True
'this hides the formula bar and status bar
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

With ActiveWindow
'this gets rid of headings, scrollbars, and tabs
.DisplayHeadings = False
' .DisplayHorizontalScrollBar = False
' .DisplayVerticalScrollBar = False
' .DisplayWorkbookTabs = False
End With

Sheets("start page").Select


End Sub


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
Sub-menus of main menus for Excel 2007 Eleanor Peppard New Users to Excel 1 March 16th 10 04:12 PM
Protection Gets Removed!! Meg Partridge Excel Discussion (Misc queries) 2 November 20th 08 03:12 PM
difference between word 2003 menus and word 2007 menus-Explain pl kali Excel Discussion (Misc queries) 1 August 29th 07 07:56 AM
New Menus - attaching but menus are reset Greegan Excel Worksheet Functions 0 November 5th 05 03:19 PM
Overriding Actions of Excel DropDown Menus and Poup Menus Von Shean Excel Programming 2 February 3rd 04 06:43 AM


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

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"