LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Hidden Worksheets

You need to use some code to make the target worksheet visible and the
call the hyperlink a second time. Right-click the tab of the worksheet
than contains the hyperlink (not the sheet to which the hyperlink
refers), and paste in the following code:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim WB As Workbook
Dim WSName As String
Dim WS As Worksheet
Dim N As Long
With Target
If .Address = vbNullString Then
Set WB = ThisWorkbook
Else
Set WB = Workbooks(.Address)
End If

N = InStr(1, .SubAddress, "!")
WSName = Replace(Left(.SubAddress, N - 1), "'", vbNullString)
Set WS = WB.Worksheets(WSName)
If WS.Visible < xlSheetVisible Then
Application.EnableEvents = False
WS.Visible = xlSheetVisible
Target.Follow
Application.EnableEvents = True
End If
End With
End Sub

If the worksheet to which the hyperlink refers is hidden, the code
unhides the worksheet and then calls the hyperlink's Follow method to
go to the link on the now-visible worksheet.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Sat, 12 Sep 2009 06:36:01 -0700, stew
wrote:

Hi all
Is it possible to have Hyperlinks on one worksheet to access Hidden
Worksheets on the same work book

Thanks for looking
Stew

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden worksheets wally New Users to Excel 1 July 14th 09 06:13 AM
Hidden Worksheets zhj23 Excel Discussion (Misc queries) 3 July 9th 07 11:30 AM
why do linked worksheets keep getting hidden? MJB Excel Discussion (Misc queries) 0 February 19th 07 10:17 PM
How do I detect hidden worksheets or hidden data on a worksheet? Alice Excel Discussion (Misc queries) 4 August 24th 06 03:38 AM
Printing hidden worksheets MarcoR Excel Discussion (Misc queries) 4 April 8th 06 09:41 PM


All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"