Maco that prompts password entry based on pick list values

kwp004

Board Regular
Joined
Dec 27, 2016
Messages
93
Here's what I'm trying to accomplish:
  • In cell A1 of Sheet1, I have data validation that requires the user to select from a pick list in Column B of Sheet 2.
  • I have a button that runs a macro.
  • If the user clicks the button, I want them to be prompted to enter a password based on the pick list selection, the corresponding value in Column B of Sheet 2, and an adjacent password in Column C of Sheet 2.
  • If the password is correct, the macro runs. If it's incorrect, they get an error message.
So for example:
  1. In Sheet 2, Range B1 = "Option 1". Range C1 = "Password 1"
  2. In Sheet 2, Range B2 = "Option 2" Range C2 = "Password 2".
The user goes to A1 in Sheet 1, selects "Option 2" in the pick list. When they click a button to run a the macro, they need to enter "Password 2", or else they get an error message.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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