View Single Post
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

The hyperlink to the hidden worksheet won't work. How about just putting a
button from the forms toolbar right next to the worksheet you want to see.

Option Explicit
Sub BTNClick()
Dim BTN As Button
Dim wks As Worksheet

Set BTN = ActiveSheet.Buttons(Application.Caller)

Set wks = Nothing
On Error Resume Next
Set wks = Worksheets(BTN.TopLeftCell.Offset(0, -1).Value)
On Error GoTo 0

If wks Is Nothing Then
Beep 'error
Else
wks.Visible = xlSheetVisible
Application.Goto wks.Range("a1"), scroll:=True
End If

End Sub

I put my worksheet names in column A and the button in column B (of the same
row). Then I assigned all the buttons the same macro.

(I'd also use a button from the forms toolbar for each of the "return to the
index sheet" buttons. Then I could use just one macro for each of these, too.)

MPB wrote:

Good afternoon all,

I have a workbook containing several worksheets.
I have included an Introduction Worksheet with Hyperlinks to each sheet.
However, I would like to be able to have the worksheets hidden (or very hidden),
except the Introduction sheet, until the Hyperlink is clicked, then that sheet is activated,
and when exited (by command button), this sheet becomes hidden again, and returns the user to
the Introduction sheet.

I hope I have expalained this well enough. I have some knowledge of VBA,( I have already set up the Command Buttons on the
worksheets).
Any help on this matter would be most appreciated.

Thank you

Mathew


--

Dave Peterson