Howdy from Texas. I am a novice with VBA and recently created an interactive Excel dashboard with the intent to hide a worksheet after creating a hyperlink. I was successful setting this up using example VBA code. But, when I try to password protect the "structure" to prevent others from unhiding raw data I received the error 1004 and when I click the debug feature it highlights in yellow "Sheets(shtName).Visible = xlSheetVisible" and would appreciate any assistance in debugging to be able to hide worksheets and maintain functionality of the dashboard. Also, would appreciate any suggested courses to take to learn the basics of visual basic. Thank you MrExcel!
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim shtName As String
shtName = Target.Name
Sheets(shtName).Visible = xlSheetVisible
Sheets(shtName).Select
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim shtName As String
shtName = Target.Name
Sheets(shtName).Visible = xlSheetVisible
Sheets(shtName).Select
End Sub