Disabling / customizing error messages

  • Thread starter Thread starter sixhobbits
  • Start date Start date
S

sixhobbits

Hi guys

I'm trying to customise / disable messages for two specific error messages in a specific work sheet

First Error: (on running macro
Run-time error '91'
Object variable or with block variable not se

(I would like to customise a new message in a standard message box here.

Second Error: (On attempting to edit cells in a protected sheet
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

(I would like to have this message disabled)

Thanks for your help

Sixhobbit

Is it possible to replace these instances with standard message boxes containing a customized message
 
To do this you have to set an error handler

On Error Goto ErrHandler

and in the error handler manage it

ErrHandler:
If Err.Number = 91 Then

'some message

'and somne code to manage it
 
Great. Thanks

Anyone who can help on the disable 'workbook protected' message

Sixhobbits
 
Might be you should not allow selecting locked cells when protecting the
sheet.


Gord Dibben MS Excel MVP
 
Unfortunately, I am using cell selection to navigate around the sheet, so the cells must be able to be selected

Thanks anyway though

sixhobbits
 
So select only unlocked cells.

Why bother selecting locked cells if you can't edit them?


Gord
 
Thanks, Gord; but as I mentioned, the locked cells have to be selected in order to navigate around the page

Also, double clicking on a cell which can't be selected results in the same 'this sheet is protected' message

Anyone who knows how to actually disable this specific message

Sixhobbits
 
Back
Top