Hide Sheet Tab

Andrew

New Member
Joined
Mar 2, 2002
Messages
30
Dear All,
Could anyone show me how to write a macro to hide the sheets tab and also un-hiding them??
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Iridium

Well-known Member
Joined
Jul 15, 2002
Messages
2,831
Try recording the macro and see what code it generates
 

Mudface

MrExcel MVP
Joined
Feb 18, 2002
Messages
3,339
Recording myself hiding and unhiding the tabs via the Options View menu (always the best way to find out), gave: -
<pre>
Sub Macro3()

ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayWorkbookTabs = True

End Sub
</pre>
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
I'm a little confused. You don't need to use a macro do to this. You can just go to Format|Sheet|Hide (or unhide).

Basically, I'm just not certain if you're aware of that, or if you want a macro to do it for some other reason. :confused:

But hope it helps, anyway.

_________________<font color="#3399FF" size="3">Kristy</font>
kitten_smush2.jpg

This message was edited by Von Pookie on 2002-10-22 10:04
 

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530

ADVERTISEMENT

To hide 'em, you can use:<pre>
ActiveWindow.DisplayWorkbookTabs = False</pre>

to make 'em visible again you can use:<pre> ActiveWindow.DisplayWorkbookTabs = True</pre>

OR, if you want to be a fancy pants using 1 button:<pre>
ActiveWindow.DisplayWorkbookTabs = Not(ActiveWindow.DisplayWorkbookTabs)</pre>

HTH

EDIT:: Mudface, I used the recorder as well :)
_________________<font color = green> Mark O'Brien
This message was edited by Mark O'Brien on 2002-10-22 10:05
 

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530

ADVERTISEMENT

I can see you've used the recorder at least 2 other times in that Excel session. :)
 

Jack in the UK

Well-known Member
Joined
Feb 16, 2002
Messages
3,215
To add

its worth remembering you mush have one tab showing at all times regardless, BUT you can hide that oone by un tick tools options tabs,

If you hide all in VBE and write the code it will fault!!

Jack
 

Locolobo1

New Member
Joined
Nov 13, 2009
Messages
1
How about trying this:

Sheets("SheetName").Visible = False

You can place it in a macro or a control (button).
 

Forum statistics

Threads
1,144,214
Messages
5,723,057
Members
422,476
Latest member
beck85

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