Creating Error pop ups

C

caliskier

I am looking at validation to see if I can make a error message pop up
only when the user clicks a different sheet or attempts to save as I
don’t want to annoy people with having to constantly click on message
boxes. Is this possible?
 
D

Dave Peterson

Not using Data|Validation, but you could use worksheet_deactivate or
workbook_beforesave (or workbook_beforeclose) to run code that validates the
user's input.

But I don't think I'd bother -- lots of things could go wrong (user choosing not
to enable macros or disabling events).

I'd use an adjacent cell and just put a formula that checks:

=if(isnumber(a1),"","Please put a number in A1!")

format it in big red letters and the error will be seen immediately.
 
Top