Help: Show Insert/Edit/Remove Hyperlink Option On Read Only Sheets (Locked)

cbryan15

New Member
Joined
Mar 5, 2013
Messages
24
Hi Excel Geniuses!

I would like to ask some help in resolving this matter. I am almost done doing this Excel project of mine. Each sheets consists of locked and unlocked cells. Whenever someone opens the file, it will automatically change it's interface to read-only, whereas, it will lock all the cells that are protected and remain unlocked all those that are not. I entered this VBA code:

Private Sub Workbook_Open()
For Each ws In Sheets
With ws
.Unprotect Password:="Secret"
.Protect Password:="Secret", UserInterfaceOnly:=True
.EnableOutlining = True
End With
Next ws
End Sub

But the problem is, Excel will not allow me to insert, edit or remove HYPERLINK on the cells that need hyperlink. Can you please help me resolve this thing? Is there a VBA code that I can use to make the hyperlink option enabled if the file is protected?

Thank you very much in advance!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi
But the problem is, Excel will not allow me to insert
Who is going to insert hyperlinks, you or the end user? You know the password, so it would just be a matter of unprotecting the sheet.
Anyway, for the record, it can be done with VBA:

Code:
Sub AddHyperLink()
Dim Ad$, Nm$, Tip$
      
Ad = "http://www.startrek.com"
Nm = "Star Trek"
Tip = "Click me"
With Sheet1
    .Protect Password:="secret", UserInterFaceOnly:=True
    .Hyperlinks.Add Anchor:=.Range("d4"), Address:=Ad, ScreenTip:=Tip, TextToDisplay:=Nm
End With


End Sub
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top