removing toolbars and taskbars from only one worksheet or workbook

  • Thread starter Thread starter Jaytee
  • Start date Start date
J

Jaytee

I have created an app in excel, but need to have certain worksheets that do
not show the tool/task bars, or anything other than the content of the cells.
I do not wish to have this condition affect any other workbooks.
 
Hi,

Turn on the macro recorder and turn off all the items you don't want to
show, then stop the recorder. Repeat the recording process while turning all
the items back on.

You can attach the first recording to the Workbook_Activate procedure and
the second to the Workbook_Deactivate procedure.

Here is a sample:

Private Sub Workbook_Activate()
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
End With
End Sub

1. To add this code to your file, press Alt+F11,
2. In the VBAProject window, top left side, find your sheet name under your
file name and double click it.
3. Paste in or type the code above.
 
Shane

Workbook_Activate will do nothing in a sheet module.

OP wanted "certain sheets" not all sheets.

I think OP should use Private Sub Worksheet_Activate() and Private Sub
Worksheet_Deactivate() in each of those "certain sheets"

Also, OP would need a method to switch sheets since the Sheet Tabs are
unavailable for selection.


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top