Viewing Hidden Sheets with a Macro

Shazz

Board Regular
Joined
Oct 28, 2010
Messages
136
Hi I have created a macro to a sheet that is hidden but it is not working, basically I have a sheet named "Employees" and various sheets named from Jan 2011 Through Dec 2011, I want the Month Sheets to be hidden and a button on the Employee sheet that when pressed will show the relevent sheet, then when I go back to the Employee Sheet it hides again.

Can anyone help me please, I am pulling my hair out with this???

Shazz
:confused:
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I have a modeless userform that I use on a file with ~200 hidden tabs. When you click on a cell (on a table of contents tab) with the tab name, it unhides the tab and selects it. When you click on the same userform button, it selects the previous tab and rehides the one you were just on. At any rate, what you are trying to do is definitely possible but I have no idea what you're working with.

Post the code you've put together and any other relevant information and I'll try to help you.
 
Upvote 0
If you name your buttons the same as the sheets in question you can use this to activate them:

<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> FollowtheButton()<br>    Sheets(Application.Caller).Activate<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>

To hide the sheet you can have a button on each sheet that activates the Employee sheet and hides the activesheet:

<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> GoHome()<br>    ActiveSheet.Visible = xlVeryHidden<br>    Sheets("Employees").Activate<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

HTH,
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,513
Members
452,921
Latest member
BBQKING

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
Back
Top