Lock a row after a value is chosen from a drop down menu

cduckett

New Member
Joined
Sep 18, 2012
Messages
1
I'm very new to VBA and was wondering if someone could help me write a code to lock a row after a certain value is chosen from a drop down list in the last column (Q) and then the file is saved.

For example, the rest of the row is filled out normally with text values, integers, and also a few choices from drop-down lists. The last column, when the answer "Yes" is chosen from a drop-down list, I have conditional formatting that causes the entire row to be highlighted.

After, the "yes" value is selected, and the user saves the spreadsheet, I would like if the entire row became locked to prevent any tampering/errors.

Right now, I have the sheets protected with a password that prevents selecting of "locked cells."

Thanks in advance!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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