Display MsgBox prior to MS error message?

EssKayKay

Active Member
Joined
Jan 5, 2003
Messages
417
Office Version
  1. 2007
Platform
  1. Windows
I’m not sure this is possible and not sure I can explain but I’ll try.
I have dropdown lists (K9, K11, K13) of dates that comes from a formula in Range (P33:P500) as follows,

VBA Code:
=IF(B34="","",IF(isformula(I34),IF(I34=0,C34," ----- ")," ----- "))

If a date is entered into K9, then that date is no longer available for entry into cells K11 or K13. If a previously entered date is attempted the following error message appears.


1697504252573.png


I would like a message box to be displayed prior to the above MS error so as to explain why the error is happening.

Thanks,
Steve K.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
The Data validation process allows you to specify an "input message" (a sort of "Tip" that will be displayed when you select the cell) and an "Error message", to be displayed instead of the standard error message (the one that is in your error popup). So look for these Tabs when you set up the data validation, and use them to give proper suggestions to the user
 
Last edited:
Upvote 0
The Data validation process allows you to specify an "input message" (a sort of "Tip" that will be displayed when you select the cell) and an "Error message", to be displayed instead of the standard error message (the one that is in your error popup). So look for these Tabs when you set up the data validation, and use them to give proper suggestions to the user
Thanks Anthony that's closer to what I was hoping for. I will place an explanation in the message field that hopefully lets the user know what to do. However, I'm just wondering if there is some way to limit the button options (Yes, No, Cancel, Help) to only one option, say Cancel. If the user inadvertently selects YES, it posts the erroneous value to the cell even though it is not an accepted value.

Thanks again for you time and consideration,
Steve K.
 
Upvote 0
In the "Error message" tab you can specify the style as a Stopping error, a Warning or an Information; if you select "Stop", the only options available are Retry or Cancel
 
Upvote 0
Solution
In the "Error message" tab you can specify the style as a Stopping error, a Warning or an Information; if you select "Stop", the only options available are Retry orI should have looked closer - sorry. I still wish but this is better
Got it. I should have looked closer - sorry. I still wish there was only one option but this is much better.
Again, my thanks Anthony - much appreciated.
 
Upvote 0
Thank you for the feedback

Please note that if you use Office 365 or 2021, it would be quite easy to create a validation list where used values are removed from the validation list.
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,091
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top