Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Please can you help?
I have a spreadsheet with 13 work sheets I want to hide 12 of them so only one is visable but then use hyperlinks to access the hidden pages. I can set up the hyperlinks, but then as soon as I hide the page the link does not work any more. Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use a buttons on your visible worksheet instead that call a macro like this.
Simply allter the code for each button to reflect the sheet name. Sub Button1_Click() Worksheets("sheet4").Visible = True Worksheets("sheet4").Select End Sub Then use this in the code for each sheet to make it invisible again Private Sub Worksheet_Deactivate() Worksheets("Sheet4").Visible = False End Sub This latter code is entered by right-clicking the sheet tab and pasting it in there. Mike "Josie" wrote: Please can you help? I have a spreadsheet with 13 work sheets I want to hide 12 of them so only one is visable but then use hyperlinks to access the hidden pages. I can set up the hyperlinks, but then as soon as I hide the page the link does not work any more. Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Josie,
Sorry the line to make the sheet invisible again should be:- Worksheets("Sheet4").Visible = xlVeryHidden Making it very hidden stops someone using format - sheets - unhide. Mike "Josie" wrote: Please can you help? I have a spreadsheet with 13 work sheets I want to hide 12 of them so only one is visable but then use hyperlinks to access the hidden pages. I can set up the hyperlinks, but then as soon as I hide the page the link does not work any more. Thanks |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Assuming that Sheet1 is where you have your hyperlinks and just to give an
example, let's say A1 links to Sheet2!A1, A2 links to Sheet3!A1. 1. Right-Click on the Sheet1 tab, click on View Code and paste this code: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Application.EnableEvents = False Select Case Target.Range.Address Case "$A$1" Sheet2.Visible = xlSheetVisible Target.Follow Case "$A$2" Sheet3.Visible = xlSheetVisible Target.Follow End Select Application.EnableEvents = True End Sub 2. Double-click on the ThisWorkbook object in the project explorer. Paste this code: Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) If Sh.Name < "Sheet1" Then Sh.Visible = xlSheetVeryHidden End If End Sub "Josie" wrote: Please can you help? I have a spreadsheet with 13 work sheets I want to hide 12 of them so only one is visable but then use hyperlinks to access the hidden pages. I can set up the hyperlinks, but then as soon as I hide the page the link does not work any more. Thanks |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Where do I find this "Double-click on the ThisWorkbook object in the project
explorer. " "Vergel Adriano" wrote: Assuming that Sheet1 is where you have your hyperlinks and just to give an example, let's say A1 links to Sheet2!A1, A2 links to Sheet3!A1. 1. Right-Click on the Sheet1 tab, click on View Code and paste this code: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Application.EnableEvents = False Select Case Target.Range.Address Case "$A$1" Sheet2.Visible = xlSheetVisible Target.Follow Case "$A$2" Sheet3.Visible = xlSheetVisible Target.Follow End Select Application.EnableEvents = True End Sub 2. Double-click on the ThisWorkbook object in the project explorer. Paste this code: Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) If Sh.Name < "Sheet1" Then Sh.Visible = xlSheetVeryHidden End If End Sub "Josie" wrote: Please can you help? I have a spreadsheet with 13 work sheets I want to hide 12 of them so only one is visable but then use hyperlinks to access the hidden pages. I can set up the hyperlinks, but then as soon as I hide the page the link does not work any more. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to make userform work publically with hidden sheets? | Excel Discussion (Misc queries) | |||
How to make userform work publically with hidden sheets? | Excel Worksheet Functions | |||
Cell to cell hyperlinking does not work, please help | Excel Worksheet Functions | |||
Counting dates in multiple work sheets and work books | Excel Discussion (Misc queries) | |||
I wish to save my Excell work in my work sheets | Excel Worksheet Functions |