Vba expire in certain days

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
890
Hi all, I would like to use a vba code so that to stop run in certain days. e.g.in 60 days from today. I prefer the days in Latin numeric. Therefore that is bit like licence expired. Thank you all in advance
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Not sure I follow ,,,,but where is the current date stored ?
AND
what do you mean by this ?
Code:
I prefer the days in Latin numeric
60 days from today is simply that
Code:
today() +60
 
Upvote 0
Hi Michael, sorry that mention current date. we should enter a specific date into the code which it means that the code should count from the date we entered. e.g. today or any other date.
About the example of 60 days if is possible to be LX in Latin numeric. If is complicate do not worry, i appreciate and accept any suggestion and code about it. Thank u once again for your support.
 
Last edited:
Upvote 0
Happy to help, but I don't understand the LX.....even though I do understand roman numerals !!
Do you mean the 60 will be in the cell as LX rather than the number ?
AND
As I mentioned where will the current date be stored ??
 
Upvote 0
Hi Michael, im bit shame that i bother you and i express my apologies. pls ignore latin numbers and just for information purposes some examples are follows:
I = 1
II = 2
IV = 4
LX = 60
e.t.c.

I was thinking that it was working with current date which in center in footer note, but is another fault by my self. pls ignore it too.

I revise my query and i am asking a code so that to stop run from a specific date, which we should enter into the code by adding certain days next to date. e.g. exdate: dd/mm/yyyy + 45 days

I hope to provided better information now and i express once again my apologies for missing information i provided in my initial text.
Thank you for your continued support
 
Upvote 0
Any support to the above is highly appreciate. I revised my first post and i require to enter an expire date in an existing VBA code. Thank you all in advance
 
Upvote 0
Maybe like this....but I still don't see the reasoning behind roman numerals

Code:
Sub MM1()
Dim mydate As Date
mydate = "01/02/2019"
If mydate + 30 >= Date Then Exit Sub
End Sub
 
Upvote 0
Thank you Michael. The code is what i required based on my revised post and it works perfectly. Regarding roman numerals is just for secure reasons. However i would like to thank you once again for your continued support. Hv a great day!
 
Upvote 0
glad it worked and thx for the feedback...:beerchug:
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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