If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hyperlinks
Hi
I have set a number of hyperlinks up in excel to jump to different worksheet in the same workbook. My problem is when i hide the worksheets my hyperlinks do not work when I want to go to the hidden worksheets. Can I hide my worksheets and have a master worksheet which allows me to jump into the hidden worksheets through hyperlinks? Regards Matt --- Message posted from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
Hyperlinks
How did you create the hyperlinks (insert|Hyperlink or the worksheet function
=hyperlink())? If you used Insert|Hyperlink, then maybe you could use something like this: Option Explicit Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim testRng As Range If Target.Address "" Then Exit Sub End If Set testRng = Nothing On Error Resume Next Set testRng = Application.Range(Target.SubAddress) On Error GoTo 0 If testRng Is Nothing Then 'do nothing Else If testRng.Parent.Visible = xlSheetVisible Then 'do nothing special Else testRng.Parent.Visible = xlSheetVisible Application.Goto testRng End If End If End Sub Right click on the worksheet tab that has the links and select view code. Then paste this in the code window. If the link points to a different workbook, then it quits. If the link points at a valid range address, then it checks to see if that sheet is visible. If it is, then it quits (and the hyperlink will work). But if it isn't, then it unhides the worksheet and goes to that address. "engmgriff " wrote: Hi I have set a number of hyperlinks up in excel to jump to different worksheet in the same workbook. My problem is when i hide the worksheets my hyperlinks do not work when I want to go to the hidden worksheets. Can I hide my worksheets and have a master worksheet which allows me to jump into the hidden worksheets through hyperlinks? Regards Matt --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Thread Tools | |
Display Modes | |
|
|