Using a set date to prevent access to Excell tabs and macros

ginotx

New Member
Joined
Dec 13, 2023
Messages
19
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Let me start of stating I know that security is not very strong with Excel.

What I am looking for is not so much security but rather a method to delete info on a spreadsheet after a set date. I am looking for a "kill pill" that will activate after a specific date is reached 6 months in the future. I do not trust my employer to not take my work and pass it out to other branches rather than pay me extra for my work created on my own time to improve my own branches operations. What I am attempting will be sufficient for the company I work with as they are not computer literate enough to work around Excel.

Basic description of file:
I am setting up a preventative maintenance program based on 52 weeks of the year. I have created tabs for each week of the year with the required crop and chemical treatments needed that week. All tabs are locked and hidden. There is a front page where the user selects which week of the year he needs and the selection will print out automatically. There will be only one tab visible on the file.

There will be a tab with a master list of all chemicals and mixes that I update monthly, this will be locked and hidden also. This master tab is where I want the info deleted after a set date.

For Example: I would like to set the kill date for December 31, 2024. When the program is opened after that date, the master list of chemical mixes will be deleted either by a macro or some other method.

Thank you in advance for any suggestions.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Not sure exactly what you want to "remove". If you put this in the workbook_open() event and alter the date and sheet reference to what you need, it should delete everything, including any formulas. If you meant to save formulas or instead, delete the whole sheet, that is another thing.

If Date >= #8/15/2024# Then Sheets("009").UsedRange.Delete
 
Upvote 0

Forum statistics

Threads
1,221,230
Messages
6,158,662
Members
451,507
Latest member
aexis48d

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