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.
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.
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.............
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission
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
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.