Code needed

cole7011

New Member
Joined
Oct 19, 2004
Messages
37
is they a section of code, which can be used to hide some worksheet tabs but not others ??

and is they a way of hiding the toolbars in excel through code,

based on that i would simply place you code in to my macro thats made allready

thanks
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

shades

Well-known Member
Joined
Mar 20, 2002
Messages
1,550
To hide sheets, by using worksheet name, include a line for sheet worksheet:

Code:
    Sheets("Source").Visible = False

If you want it more systematic, you can create a loop.
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Yes, quite possible. A couple strong recommendations: 1) don't mess with toolbars too much, and 2) perform a board search. These issues have many answers for you on this board. :)

(Heya Shades!)
 

shades

Well-known Member
Joined
Mar 20, 2002
Messages
1,550
cole7011 said:
include a line for sheet worksheet:


??

"sheet worksheet" ??

The tab is technically called a worksheet. There are at least two ways to reference them, by number, or by the name (the name on the tab). In this case it might be easier to use the worksheet names.

Thus, if your worksheets are named: Source, Work, Copier, House

And you want to hide all but house, then:

Code:
 Sheets("Source").Visible = False 
 Sheets("Work").Visible = False 
 Sheets("Copier").Visible = False

This will hide the three sheets/worksheets/tabs, and leave House as the only one showing.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,409
Messages
5,595,973
Members
414,035
Latest member
billbumkins

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top