Data Entry into Cell Range between 2 specific date periods and to lock after a specific date

rpra137

New Member
Joined
Dec 6, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone!
I'm new to VBA, but I have a number of ranges, which I only want to be editable between specific dates.

I.E. Data range should be editable between 01/01/2024 to 01/03/2024. After 30/01/2024, the range should be locked preventing any further amended or changes. I have to repeat this 12 times across 12 ranges for different dates, the next being editable between 01/02/2024 to 01/03/2024, and being locked on 30/02/2024.

I've looked into ways of doing this and realise that probably VBA is the best option - but I can't seem to work out the best to code this!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Data range should be editable between 01/01/2024 to 01/03/2024. After 30/01/2024, the range should be locked
That's contradictory. Editable between 1st January and 1st March - but locked after the 31st January?!
Also, what day of the week does "30/02/2024" fall on?

What you're asking for is achievable with worksheet activate event code, but you're going to have to be a lot clearer with your expectations.
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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