3smees23
07-13-2012, 08:12 AM
Hi,
I'm trying to issue a new spreadsheet at work, however before I do I need to protect it. I have a couple of buttons that insert rows (they only work when you click the 'unhide crosshair' to the left).
When I protect my worksheet the crosshair and the buttons don't work!!
I have looked on the internet and realised that I could use the EnableOutlining function. However this still does not allow me the functionality I need.
I have the following code at the bottom of module1:
Private Sub Workbook_Open()
With Sheets("Take - Off")
.Unprotect Password:="sam"
.Protect Password:="sam", UserInterfaceOnly:=True
.EnableOutlining = True
End With
End Sub
Please can someone help, protecting a sheet should be so simple yet I'm here pulling my hair out.
Thanks
Sam
I'm trying to issue a new spreadsheet at work, however before I do I need to protect it. I have a couple of buttons that insert rows (they only work when you click the 'unhide crosshair' to the left).
When I protect my worksheet the crosshair and the buttons don't work!!
I have looked on the internet and realised that I could use the EnableOutlining function. However this still does not allow me the functionality I need.
I have the following code at the bottom of module1:
Private Sub Workbook_Open()
With Sheets("Take - Off")
.Unprotect Password:="sam"
.Protect Password:="sam", UserInterfaceOnly:=True
.EnableOutlining = True
End With
End Sub
Please can someone help, protecting a sheet should be so simple yet I'm here pulling my hair out.
Thanks
Sam