Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Custom Dialog Box

Status
Not open for further replies.

Mike555

Technical User
Feb 21, 2003
1,200
US
In Microsoft Excel, when a user attempts to change a protected cell a dialog box appears with the following statement:

The cell or chart 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 (Tools menu, Protection submenu). You may be prompted for a password.


Is it possible to change this message using VBA? I need the dialog box to say "Contact the System Administrator for the password."

Thanks!
 
Hmmm - don't think this is possible without some heavy API calls (have a look at if you are interested)
Other then that, not even "application.displayalerts = false" stops the error message appearing and there would be no way to trap the event anyway 'cos the workshet CHANGE event doesn't fire until after the error message, by which time, there is no change and therefore the event doesn't fire at all

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top