![]() |
Error Handling an attempt to change a protected cell
I have a sheet with several protected sections. If an attempt is made to
change a protected cell the generic error box comes up notifying the user that the workbook is protected. I would like to display my own dialog box when a user tries to change a protected cell. Can this be done? How? Thanks in advance for the help. Mike |
Error Handling an attempt to change a protected cell
try something like this:
CODE If ActiveSheet.ProtectContents = False Then ' allow user actions End Else MsgBox "Please unprotect the sheet before changing cells", vbCritical + vbOKCancel, "Entry Error" exit sub End If <<<< END CODE HTH Philip "crazybass2" wrote: I have a sheet with several protected sections. If an attempt is made to change a protected cell the generic error box comes up notifying the user that the workbook is protected. I would like to display my own dialog box when a user tries to change a protected cell. Can this be done? How? Thanks in advance for the help. Mike |
All times are GMT +1. The time now is 07:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com