Frank Freese
asked on
Change Excel system messages
Folks,
When certain cells in a worksheet are protected Excel gives you a message. Is there anyway to create your own messages and not use Excel's? I know in Access you can capture the error code and generate your own message so I was wondering if you could not do the same in Excel.
When certain cells in a worksheet are protected Excel gives you a message. Is there anyway to create your own messages and not use Excel's? I know in Access you can capture the error code and generate your own message so I was wondering if you could not do the same in Excel.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@rspahitz
Your code is simply error handling and will not react when sheet is protected.
gowflow
Your code is simply error handling and will not react when sheet is protected.
gowflow
ASKER
Thank you folks...I can see me incorporating both suggestions.
Good work - 50/50 spread
Good work - 50/50 spread
ASKER
all good suggestions
appreciate all the experts very much
appreciate all the experts very much
Glad that the information was useful. It's always good practice to put error-trapping in any piece of code (*) that could potentially create an error (and in Excel, it's almost every piece of code.)
(*) subs called by error-handled methods may not need error-traps if you don't mind the error floating up, but then you typically lose access to the line or other information about where the error occurred.
(*) subs called by error-handled methods may not need error-traps if you don't mind the error floating up, but then you typically lose access to the line or other information about where the error occurred.
ASKER