suggestion


B

Brenda

I have created 8 buttons on "home page" which takes them to different hidden
sheets. On each of those hidden tabs is a button that says back to home. The
questions i have is i would like to have on those hidden tabs the same links
that are on the home page. In other words they wouldn't have to click the
home button to get to another tab. I hope this makes sense. But how would i
do this i also want the sheet to go back to being hidden once they click on
another button. What code would i use. I hope someone understand what i am
asking.
 
Ad

Advertisements

S

ShaneDevenshire

Hi,

Here is sample code

Sub Button1_Click()
Sheets("Sheet1").Visible = xlSheetVeryHidden
Sheets("Sheet2").Visible = xlSheetVisible
Sheets("Sheet2").Activate
End Sub

If this helps, please click the Yes button
 
B

Brenda

I will try this code but where do i apply it? Basically there will be 8
buttons on each page, if i try your code where should i put it.
 
B

Brenda

Shane,
Here is what i have done... because i am on the Herddescription tab and i
want to go to another tab i put in the tab that i now want to bring up. But
when i apply the macro to the button it brings up an error highlighting the
Sub Button1_Click(). Am i doing something wrong?

Sub Button1_Click()
Sheets("HerdDescription").Visible = xlSheetVeryHidden
Sheets("Requirements").Visible = xlSheetVisible
Sheets("Requirements").Activate
End Sub
 
Ad

Advertisements

G

Gord Dibben

Brenda

Not sure what your purpose is but...............

If HerdDescription sheet is only visible sheet, you cannot hide it before
unhiding another sheet.

You must always have one sheet visible.

Change your code to unhide first, then hide...............

Sub Button1_Click()
Sheets("Requirements").Visible = xlSheetVisible
Sheets("Requirements").Activate
Sheets("HerdDescription").Visible = xlSheetVeryHidden
End Sub


Gord Dibben MS Excel MVP
 
Ad

Advertisements


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

Top