Set an Expiration Date to your Excel File

preview_player
Показать описание
There are different situations where you need to set an Expiry date to your Excel File and prevent a user from working on it. (please Read the Warning here below)
In this tutorial I show you how to do that in 2 different Scenarios.
If you have never created a code in VBA, it’s your chance to learn by following me step by step.
If you still have difficulty, then I wrote the code for you on a separate hidden worksheet so you can just Copy and Paste in the Visual Basic Editor (ALT +F11)
Remember that when you create a VBA code you should save your file as a Macro Enabled Excel File (.Xlsm). Moreover you may consider protecting the code with a password.
You can download the Exercise files and follow along by clicking on the links:
1- Predefined Expiry Date
2- Calculated Expiry Date

##### WARNING ###### WARNING #####
IF you forget to open the file before the set expiry date and change the date in the code, you will not be able to open the file anymore if it goes beyond the set date.
Be extra cautious when setting an expiry date and set a reminder few days before expiry!!!

To keep me motivated, don’t forget to Like… Comment… Share and Subscribe
Рекомендации по теме
Комментарии
Автор

Thank you Mr. Nabil, my name is also nabil, i liked your videos and the way you explain, is very simplified.. good luck

kinchannel
Автор

I am in the middle of video. Not sure what will be coming next. But Already given a like button. Really good effort to explain in detail. Great effort. Keep up the GOOD work BROTHER.

ramy
Автор

just in time for this tutorial. since I want to sell my file and I want them to atleast try the file for several days. Thank You

DarylSunga
Автор

thanks for the explaining in such detail. question. is there a way to put the expiration date in a text file on a web server and then look it up. This would help in cases where once clients pays we can just change the date on our side and the workbook opens again. what would the coding be for this lookup

bodapatirama
Автор

Thank you very much indeed. This is really cool. The way you explained is superb. I am sure many people including me will benefit from you. Without hesitation, I subscribed liked and commented. Please upload more

frankie
Автор

Very good elaboration about the topic. It's now become so easy. Thanks man for the tutorial

mehedihasaniqbal
Автор

Awesome Work done learnt a lot. Sir is there any way to open the file if the set expiry date is not changed to another advanced date. Is there any way that we can create for Master Activation Code for the creator of the workbook and user activation code for user, and and if the file is distributed to other person by the one already using it it is set to default use of 10-15 date after that it gets locked and can only be activated by providing the user activation code

adit
Автор

Few years ago I have searched web for the predefined expiry code and found it. But how it works and a bit easier code has found now. Is it necessary to mention here that I am one of the fans of your clarity and beautiful presentation? 💕

zaighamuddinfarooqui
Автор

Thank you Mr, Nabil for this great video! very informative for me, but I wanna ask u sir if I wanna the left days alert pop-up only when the current date near to expire date not far from it.
PS, I wanna email u about how to set a password to the vb code .
thank you sir,

m.elbanna
Автор

Very good work Mr Nabil. But after expiry screen appears then clicking OK. The screen of (save - don't save - cancel) appears. And when I click cancel the file opens. I'm working on office 2019.

eng-ebrahimeldeeb
Автор

Thank you very much 😊. And at the end, what did you pressed to improve the code appearance??

alihamid
Автор

Hi there, I would like to know if it is possible to make an excel file shareable so that multiple users can work in the workbook but not copy-able so the user wont be able to make copies of it.

ftdbswo
Автор

Hello
Thanks for this great video.

Is there a way of making something like a licence such that after expiry the sheet can be activated again? I will be glad to hear from you

Автор

Great video and perfect function!!!!
As I understand I need to have a copy without this code. Otherwise I cant open it my self after expiration date
I tried open the file holding "shift" at the same time but that do not work.

PerBerglund
Автор

Hi - I love your video. I have created an expiry date using the 2nd video example. The only thing I don't want tho is each time you open the spreadsheet it brings up the msgbox saying they have 365 days to use the file. Can a code be added where this only appears once upon opening file and then starts warning them towards the end of the subscription? Like a month out?

jenniferfaulkner
Автор

Very informative and easy to understand and follow. The only trouble is that I can't get the date to show in the relevant cell or the message box to appear. Any suggestions please? Please ignore - now working, fault lay somewhere with me!

davidfromstow
Автор

Fantastic, it worked Great

I have one challenge that anyone whom i share can also go and change the vb code and extend the trail. How to prevent that?

GannDecoderSreeHarsha
Автор

What a great way to teach us Thank You sir . but 2 Questions how can we recover expired Workbook and how can we force user to enable macros.?

sabeelmughal
Автор

very nice thanks alot for the video.
well my question is i am using code for force the user to turn on the macro . and your code of expiry but it give me error . how to merge these 2 codes ??? they run perfectly independently ..
thanks.

madserv
Автор

Awesome ! Thank you so much. Is there a way to make the file read-only after a set date instead of locking out?

bradyallen