A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlinks



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2004, 09:38 AM
engmgriff
external usenet poster
 
Posts: n/a
Default 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  
Old June 15th, 2004, 01:11 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.