Hey all. I am new to VBA and am working on a project that now has me obsessed and stressed - until I figure it out. 
I have a workbook with several sheets. The main "HOME" sheet has hyperlinks to each sheet.
My question is - how do I hide one sheet "The ADMIN sheet" and still activate it?
I created a userform for the Admin link so the user has to enter a password to access that sheet. It works great - until I hide the sheet. As soon as I do this, the link is broken.
Here is the coding I am using that works when the sheet is visible. What parts do I need to modify so it will still work when the sheet is hidden?
Thank you!
Private Sub cmdOPEN1_Click()
'Attached to On Click event of AdminPage
Dim strPasswd
strPasswd = InputBox("Please Enter Password", "Restricted Form")
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If
'If correct password is entered open AdminPage
'If incorrect password entered give message and exit sub
If strPasswd = "password" Then
'Activate Worksheet
Sheets("AdminPage").Activate
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
Bookmarks