instead of having excel pop up and give the user instrustions on how to unprotect a sheet, is there a way I can avoid this by using a message box?
thanks!
instead of having excel pop up and give the user instrustions on how to unprotect a sheet, is there a way I can avoid this by using a message box?
thanks!
You could probably use:
Please Login or Register to view this content.
to trap the error. Then, if the err.number <> 0, display a message box.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
the only problem I think I have with that is that it's not an error.
its happening when a sheets is protected and you try to type in a certain cells and it pops up saying: "the cell or chart that you are trying to change is protected and therefore read-only. To modify a protected cell or chart, first remove protection using the Unprotect Sheet command (Review Tab, Changes Group). You may be prompted for a password."
It's an error in that you are trying to change a locked cell on a protected sheet. If you know that's what you want to do under program control, either unprotect the sheet in code yourself, or intercept the error and use your own message.
Your choice.
Regards, TMS
you cannot alter or prevent the built-in message if you have a user typing in protected cells
Josie
if at first you don't succeed try doing it the way your wife told you to
Yes,
I tried what you told me, and nothing is happening. I'm still getting the same pop up message
Where should this code be located?Please Login or Register to view this content.
Thanks JosephP.
unchecked select locked cells under protect sheet dialog box.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks