Suppressing an excel message

S

Sadia

Hi,
I am trying to find a way to suppress an excel message from appearing.
For example, if a user tries to change value in a protected cell he
gets the following message:
"The cell or chart you are trying to change is protected and therefore
read only....."

I want to know if there is a way to avoid this message from appearing.
Can I stop this message from appearing and show my own customized
message?

Thanks
Sadia.
 
D

Dave Peterson

I don't think you can change that message, but maybe you could stop the users
from selecting those protected cells:


Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With
End Sub

Excel won't remember these settings after you close it and reopen the workbook
(that's why it's in auto_open).

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top