Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Hide menus and toolbars 2

Status
Not open for further replies.

Claulle

Technical User
May 22, 2003
37
DK
Hi

Im wondering if its possible to hide the menus and toolbars. I want to make some kind of presentation so the end-user should not get to see the menus and toolbars.

How can that be done?

Thanks in advance!

/Claus

 
View / FullScreen will take of most of it for you

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Hi Ken

Thanks for the reply.

That would work on my computer only. What i want is to make some kind of presentation in Excel. When the user opens the sheet i dont want the toolbars and menus to be shown.

All i want to be shown when a user opens the excel-file is the titlebar.

Kind regards
Claus
 
Then maybe an event macro, something like the following in the ThisWorkbook module of your file:-

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
Application.CommandBars("Full Screen").Visible = False
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayFullScreen = False
With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
End Sub

Though if the user chooses not to enable macros it easily defeats it anyway.

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Hi Ken

Thanks alot. That was it :)

Kindly regards
Claus
 
You're welcome :)

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
hi
This is a macro i wrote for word to hide the menu bars when a certain document is opened and to restore them when the document is closed

an easy way to write to get the code for this is go tools -> macro -> record new macro and perform the action that you need stop the macro and go view the code for the macro that you just ran

Sub AutoOpen()
'hides menubars and spell checking and runs transcribe macro if trantemp.doc
If ActiveDocument.Name = "TRANTEMP.DOC" Then
CommandBars("Standard").Visible = False
CommandBars("Formatting").Visible = False
CommandBars("Mail Merge").Visible = False
CommandBars("drawing").Visible = False
transcribe
ActiveDocument.ShowSpellingErrors = False
ActiveDocument.ShowGrammaticalErrors = False
CommandBars("menu bar").Controls("finalize").Enabled = True
End If

'Selection.HomeKey Unit:=wdStory
End Sub
Sub AutoClose()
'returns menubars on exit
CommandBars("Standard").Visible = True
CommandBars("Formatting").Visible = True
CommandBars("Mail Merge").Visible = True
CommandBars("Drawing").Visible = True
ActiveDocument.ShowSpellingErrors = True
ActiveDocument.ShowGrammaticalErrors = True
CommandBars("Menu Bar").Controls("finalize").Enabled = False
If ActiveDocument.Name = "trandata.doc" Then
ActiveDocument.Save
End If
End Sub

hope this helps
jeremy
 
Hi Jeremy

Not that the rewards are loose in my hands, but you and Ken made this clear for me and gave me a good tool to make what i want. Therefor i want to reward you as well :)

Thanks alot for your post!



Kind regards
Claus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top