View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
rita wang rita wang is offline
external usenet poster
 
Posts: 1
Default how to allow insert hyperlink and grouping together under protecti

I tried to allow insert hyperlink and grouping together on a protected sheet,
I have tried to find seperate code to allow either of them, but when I tried
to put them together, it seemed really difficult.

THIS IS THE CODE TO ALLOW GROUPING/OUTLINING AND AUTOFILTER ON A PROTECTED
SHEET, AND THE PASSWORD IS SET AS EXCEL:

Private Sub Workbook_Open()
With Sheet32
..Protect Password:="EXCEL", UserInterfaceOnly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
End Sub

AS BLOW IS MY ANSWER FROM HELP OF EXCEL TO ALLOW INSERTHYPERLINK ON A
PROTECTED SHEET,I have moved the part to mention just one single cell to
insert, because I want 3 whole column be inserted:
Sub ProtectionOptions()
If ActiveSheet.Protection.AllowInsertingHyperlinks = False Then
ActiveSheet.Protect AllowInsertingHyperlinks:=True
End If

MsgBox "Hyperlinks can be inserted on this protected worksheet."

End Sub


The point is when I put them together, the sheet can be inserted hyperlink,
grouping, protected,BUT the password doesn't work,the protection is very easy
to unprotect, just go to the data-protection-unprotected sheet.I have to
confess I never have experience of EXCEL PROGRAMMING, so could any maser help
me?

Thank you very much.