Hiding Tabs until needed

jabryantiii

Board Regular
Joined
Sep 18, 2009
Messages
129
Looking for a way to hide tab(s) until a button is clicked to move to the next tab. Basically I am looking to set up a "dashboard" page as a starting point. Once some infromation is input and a button is clicked the next page is opened and unhidden. Is that possible??
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
sheets("Sheet2").visible = false

to hide

and =true to show
 
Upvote 0
This will hide the current tab and unhide the next one:

Code:
Private Sub CommandButton1_Click()
    Sheets(ActiveSheet.Index + 1).Visible = True
    ActiveSheet.Visible = xlVeryHidden 'cannot be unhidden without code; remove "Very" to hide normally.
End Sub
 
Upvote 0
that hides the sheet once i click the button, I am looking for a way to have sheets hidden prior, so once the button is clicked it unhides the next (goto) sheet.
 
Upvote 0
The code in post#3 hides the current sheet AND unhides the next one... what are you looking for the button to do exactly? When you click it, what should happen?
 
Upvote 0
when i created the "dashboard" page, the code does not seem to hide anthing more then the dashboard tab itself. What i am looking to accomplish is having all the tabs minus the dashboard tab, hidden until the button is clicked. Once clicked it unhides the next tab. I would add this button to every page so that once it is clicked it only unhides the next tab the button is associated with.
 
Upvote 0
You can put this into the workbook code (right-click the Excel logo at the top left of the screen, view code, paste this in):

Code:
Private Sub Workbook_Open()
For Each sht In Sheets
    sht.Visible = xlVeryHidden
Next
Sheets("Dashboard").Visible = True
End Sub

That will hide all the sheets except "Dashboard" when you open the file. Then use the code from post #3 behind the button on each page.
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,025
Members
448,543
Latest member
MartinLarkin

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