Hello,
I try to add an hyperlink in a protected sheet within a macro.
It was working well at the beginning, but for some reason, now I have to unlock the cell to use the hyperlink when I protect the sheet.
But now, when you click anywhere on the sheet the hyperlink is activated....
I tryed to add a button in the box, but because i need to sort the data, it need to be place accurately in the box... And to refer to the path store int he same box...
How can I use the hyperlink (created by macro) in a protected box?
Thanks
Azban
Excel 2002
Current code is
Public Sub selectfiletoattach()
Dim Filter As String
Dim InitialDir As String
Dim DialogTitle As String
Dim OutputStr As String
Dim MyName As String
Dim Mynam2 As String
Filter = "File (*.*)" + Chr$(0) + "*.*" + Chr$(0) + _
"All Files (*.*)" + Chr$(0) + "*.*" + Chr$(0)
InitialDir = "\\ltrfs010\ltrengrng\Production Engineering\"
DialogTitle = "Select The file to attach"
OutputStr = ShowOpen(Filter, InitialDir, DialogTitle)
securityunprotect
i = Sheets("Team LOG").Range("K15")
Sheets("RFP RFM Register").Range("D" & i).Select
Selection.Locked = False
Selection.FormulaHidden = False
Sheets("RFP RFM Register").Range("D" & i).Hyperlinks.add Anchor:=Selection, Address:= _
OutputStr, TextToDisplay:="Link"
filepath.Caption = OutputStr
Sheets("RFP RFM Register").Range("A4").Select
securityprotect
End Sub
I try to add an hyperlink in a protected sheet within a macro.
It was working well at the beginning, but for some reason, now I have to unlock the cell to use the hyperlink when I protect the sheet.
But now, when you click anywhere on the sheet the hyperlink is activated....
I tryed to add a button in the box, but because i need to sort the data, it need to be place accurately in the box... And to refer to the path store int he same box...
How can I use the hyperlink (created by macro) in a protected box?
Thanks
Azban
Excel 2002
Current code is
Public Sub selectfiletoattach()
Dim Filter As String
Dim InitialDir As String
Dim DialogTitle As String
Dim OutputStr As String
Dim MyName As String
Dim Mynam2 As String
Filter = "File (*.*)" + Chr$(0) + "*.*" + Chr$(0) + _
"All Files (*.*)" + Chr$(0) + "*.*" + Chr$(0)
InitialDir = "\\ltrfs010\ltrengrng\Production Engineering\"
DialogTitle = "Select The file to attach"
OutputStr = ShowOpen(Filter, InitialDir, DialogTitle)
securityunprotect
i = Sheets("Team LOG").Range("K15")
Sheets("RFP RFM Register").Range("D" & i).Select
Selection.Locked = False
Selection.FormulaHidden = False
Sheets("RFP RFM Register").Range("D" & i).Hyperlinks.add Anchor:=Selection, Address:= _
OutputStr, TextToDisplay:="Link"
filepath.Caption = OutputStr
Sheets("RFP RFM Register").Range("A4").Select
securityprotect
End Sub