vba locked filled merged cell with password and blank merged cell remain unlock

ahjeff86

New Member
Joined
Sep 26, 2018
Messages
15
Hi there, I have 10 merged cell need to be locked after it's filled with date.

The 10 merged cell:
E46:F46
E47:F47
E48:F48
E49:F49
G46:I46
G47:I47
G48:I48
G49:I49
J46:L46
J47:L47

The current condition of the worksheet its password protected with "123" and all the 10 merged cell above its unlocked.

What I want the VBA code to do:
  1. After enter the date and save the workbook, the cell can't be edit anymore, for example I enter a date in E46:F46 merged cell after I save the workbook it will be password protected.
  2. The balance merged cell it's not password protected until its fill with the date.
  3. Popup a message if the blank cell is filled with wrong data, only accept date data, example: 26/09/2018

Hope it can be achieved via VBA.
Thanks.
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,216,172
Messages
6,129,290
Members
449,498
Latest member
Lee_ray

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