Custom dialog box on protected sheet

  • Thread starter Thread starter Paul Martin
  • Start date Start date
P

Paul Martin

Hi All

- I have a protected sheet.
- If a user attempts to type into a locked cell, I would like a custom dialog
box to appear, rather than the default ("the cell or chart you are trying to
change is protected and therefore read-only.....")
- I have successfully implemented this using the Worksheet_BeforeDoubleClick
or Workbook_SheetBeforeDoubleClick event, but can't work out how to achieve
this when the user attempts to type directly into a cell.

Any suggestions appreciated.

Thanks in advance.

Paul Martin
Melbourne, Australia
 
Paul

I don't know how to change the protection message, I don't think you can.
One kludgy work around is to use Data Validation for protection. If you
want to "lock" cell A1, you could put data validation in that cell that is

Custom - =Len(A1)=0

Then use the error alert tab on the validation dialog to create your own
message. You would have to remove the validation if you ever wanted to
change the cell. Also, you have to set up validation for every cell that
you want "locked", so a macro may be in order there.
 
Dick

That's not quite the solution I'm looking for, though I can improvise to
make it at least a partial fix. Thanks for your idea, and if anyone has
another solution, that'd be great.

Regards

Paul Martin
Melbourne, Australia
 
Back
Top