Corey_Riley
New Member
- Joined
- Sep 6, 2022
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Hi Everyone,
I'm new to VBA but I was able to create the following code that allows me to click a hyperlinked button which takes me to a hidden worksheet in my workbook and hides the original worksheet.
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
linkto = Target.SubAddress
wherebang = InStr(1, linkto, "!")
If wherebang > 0 Then
mysheet = Replace(Left(linkto, wherebang - 1), "'", "")
Worksheets(mysheet).Visible = True
Worksheets(mysheet).Select
myaddr = Mid(linkto, wherebang + 1)
Worksheets("Introduction").Visible = False
Worksheets(mysheet).Range(myaddr).Select
End If
End Sub
I want to share my document with my team but I need to protect my document so they can't mess up the coding or structure of the document.
When ever I protect my document an click on one of the buttons, the following message comes up:
I'm not sure what to do. Please help. (There is no password set for the protection function)
I'm new to VBA but I was able to create the following code that allows me to click a hyperlinked button which takes me to a hidden worksheet in my workbook and hides the original worksheet.
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
linkto = Target.SubAddress
wherebang = InStr(1, linkto, "!")
If wherebang > 0 Then
mysheet = Replace(Left(linkto, wherebang - 1), "'", "")
Worksheets(mysheet).Visible = True
Worksheets(mysheet).Select
myaddr = Mid(linkto, wherebang + 1)
Worksheets("Introduction").Visible = False
Worksheets(mysheet).Range(myaddr).Select
End If
End Sub
I want to share my document with my team but I need to protect my document so they can't mess up the coding or structure of the document.
When ever I protect my document an click on one of the buttons, the following message comes up:
I'm not sure what to do. Please help. (There is no password set for the protection function)