I am looking for a way to generate an error message if a particular cell in my spreadsheet is left blank. Does anyone have a suggestion?
I am looking for a way to generate an error message if a particular cell in my spreadsheet is left blank. Does anyone have a suggestion?
When do you want this message to appear? When the sheet is saved?
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Yes. I tried the method below but excel is not allowing me to save the worksheet since the cell is blank. It is basically a form that I need another user to fill out and there is a required field. Thank you for your help.
I tried:
Open the VBA Editor, display the Project Window (CTRL+R) and open the ThisWorkbook code module. There, paste the following code:
Please Login or Register to view this content.
Last edited by Jeanne; 06-09-2009 at 01:41 PM.
First, be SURE you know the Forum Rules. One of the most strictly enforced rule around here relates to posting code. You MUST wrap code inGo back to that last post, click EDIT > GO ADVANCED, highlight the code, then click the # icon.Please Login or Register to view this content.
========
Do that real quick, then I'll show you the trick you need to save your sheet with that macro in it. Your macro appears perfect for the job.
oops! done - thank you!
when message appears use ctrl+break
click end you can then close the workbook
most users wont know that
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Thank you both- I will give it a try!
oops JB was that your trick ? didnt see that bit of post!
Ok, just click on the DESIGN MODE button on the Control Toolbox toolbar. While in Design Mode, macros aren't running.
Save your sheet.
=========
If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].
(Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks