Gary has attended:
Access VBA course
Excel VBA Advanced course
Protecting created user forms
When you lock/unlock cells and then use protect so the users do not change the functions or delete anything by mistake. Is there anything you can do in a user form so they can hide the unprotect function?
RE: Protecting created user forms
Hi Gary, thanks for your query. You could add the following line of code to a user form - or, indeed, the Auto_Open subroutine - to delete the "Unprotect Worksheet" option from the drop down toolbar:
Application.CommandBars("Protection").Controls(1).Delete
Be careful how you deploy this and try to add the Protect Worksheet function back automatically when the spreadsheet closes.
Hope this helps,
Anthony