Need to make a mandate field when one is selected

mrdinhut

New Member
Joined
Jan 6, 2022
Messages
9
Office Version
  1. 365
  2. 2021
Hello All,

I need to make a mandate field when one is selected in excel. So basically if the drop down from one column is selected, the users must enter data on the "other column" as well.

Any help greatly appreciated!


Ut
 
Thank you Joe4!

I tried the code but it didn't show error when I didn't have that E19 filled (B15 selected).

1641493982295.png



Is this look right?

Ut
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thank you Joe4!

I tried the code but it didn't show the error when I didn't have E19 fill (B15 selected).

1641494123402.png


Does it look right?
Ut
 
Upvote 0
Thank you Joe4!

I tried the code but it didn't show the error when I didn't have E19 fill (B15 selected).

View attachment 54611

Does it look right?
Ut
Nope. Looks like you put it in a General module, and not the "ThisWorkbook" module, like I mentioned.

If you put it in the correct module, it should show "Workbook" in the top left corner, not "(General)".
1641494543010.png
 
Upvote 0
I only have "Worksheet" and "General" module ....don't have "ThisWorkbook" module...

There are only 2 tabs...but one of them have ..

1641498917048.png
 
Upvote 0
I only have "Worksheet" and "General" module ....don't have "ThisWorkbook" module...

There are only 2 tabs...but one of them have ..

View attachment 54616
Yes you do. All Excel files have it. You have to be in the VB Editor to see it. You can see it under the VBA Project Explorer, where all your modules are listed:

1641499105343.png


You need to double-click on the "ThisWorkbook" module to get into it. This is where you need to paste this type of automated event procedure code.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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