VBA pop message box based on certain criteria

jimmisavage

Board Regular
Joined
Jun 28, 2017
Messages
130
I have a userform where I want to make sure the user is inputting the necessary data.

ComboBox41 only needs to be completed IF ComboBox1 has data and ComboBox21 is empty.

So if ComboBox1 is empty we can move on.
Or if ComboBox1 has data and ComboBox21 has data we can move on.
 
No, not exactly.

If combobox1 is empty 21 and 41 can also be empty

If combobox1 has data in it EITHER 21 or 41 MUST have data.

If combobox1 has data and 21 doesn't then 41 MUST have data.

Sorry, its complicated!
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
No, not exactly.

If combobox1 is empty 21 and 41 can also be empty

If combobox1 has data in it EITHER 21 or 41 MUST have data.

If combobox1 has data and 21 doesn't then 41 MUST have data.

Sorry, its complicated!

Yes, you'll need to work out the logic then do your conditional statements. Map it out then I'd suggest doing it up in notepad or something first, then in vba. You could still use my errmsg method so the user only needs to see one popup msg telling them what is needed, but first you need to loop through all the conditions. Good luck.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,023
Latest member
alabaz

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