ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating Error pop ups (https://www.excelbanter.com/excel-discussion-misc-queries/66120-creating-error-pop-ups.html)

caliskier

Creating Error pop ups
 

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?


--
caliskier
------------------------------------------------------------------------
caliskier's Profile: http://www.excelforum.com/member.php...o&userid=25887
View this thread: http://www.excelforum.com/showthread...hreadid=502939


Dave Peterson

Creating Error pop ups
 
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.

caliskier wrote:

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?

--
caliskier
------------------------------------------------------------------------
caliskier's Profile: http://www.excelforum.com/member.php...o&userid=25887
View this thread: http://www.excelforum.com/showthread...hreadid=502939


--

Dave Peterson

caliskier

Creating Error pop ups
 

Thanks, apreciate the help


--
caliskier
------------------------------------------------------------------------
caliskier's Profile: http://www.excelforum.com/member.php...o&userid=25887
View this thread: http://www.excelforum.com/showthread...hreadid=502939


Gord Dibben

Creating Error pop ups
 
Validation won't do it.

You need VBA event code.

See Chip Pearson's site for event code instructions specificaly
worksheet_deactivate and workbook_beforesave

http://www.cpearson.com/excel/events.htm

And David McRitchie's site.

http://www.mvps.org/dmcritchie/excel/event.htm


Gord Dibben MS Excel MVP

On Thu, 19 Jan 2006 10:22:08 -0600, caliskier
wrote:


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?




All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com