View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
MSweetG222 MSweetG222 is offline
external usenet poster
 
Posts: 158
Default Unhiding specific worksheets in VBA (Excel 2003)

I figured it out. I don't know if it is the correct way, but it works.

In a class module:

Public WithEvents App As Application
Public WithEvents SheetFollowHyperlink As Workbook

Sub App_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
Dim iPos As Long
Application.EnableEvents = False
iPos = InStr(Target.SubAddress, "!")
Worksheets(Left(Target.SubAddress, iPos - 1)).Visible = True
Target.Parent.Hyperlinks(1).Follow
Application.EnableEvents = True
End Sub


Let me know if there is a better way.
Thank you,
MSweetG222