ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Hiden worksheets through a hyperlink. (https://www.excelbanter.com/excel-programming/350721-using-hiden-worksheets-through-hyperlink.html)

dk

Using Hiden worksheets through a hyperlink.
 
Hello,

I have created a work book with 13wkshts. The first includes 12 hyperlinks,
one per each of the 12 remaining worksheets. I want the users to be able to
see only the first worksheet, when they open the file ( keep hidden the other
12), select their month (link) and then jump to the specific worksheet, out
of the 12 (unhide only that one). At the end when the user saves the file i
would like all 12 wksheets to hidde again.

Currently when I hide the wksheets my hyperlinks are not working.

Do you have any ideas of how to do it?

Thank you very much for the time spend for my question.

Best regards

DK

Centurius

Using Hiden worksheets through a hyperlink.
 
DK

I'm no expert, but the problem above is relatively simple using Command
Buttons in place of hyperlinks.

using the 'control toolbox' toolbar place 12 buttons on your first
sheet, and a button on each sheet to return to the first sheet.

code will look something like this.
----------------------------------------------
'VB Code for Sheet 1

Private Sub ShowSheet2_Click()
Sheets("Sheet2").Visible = True
Sheets("Sheet2").Select
End Sub

Private Sub ShowSheet3_Click()
Sheets("Sheet3").Visible = True
Sheets("Sheet3").Select
End Sub

'etc etc

----------------------------------------------
'VB Code for Sheet 2

Private Sub HideSheet2_Click()
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Sheet1").Select
End Sub

----------------------------------------------
'VB Code for Sheet 3

Private Sub HideSheet3_Click()
Sheets("Sheet3").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Sheet1").Select
End Sub
--------------------------------------------

Hope this helps you

Dan



All times are GMT +1. The time now is 03:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com