Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro expires
Hello
I have a simple OnSave macro that that i have created. In cell b3 is the date (mm/dd/yy). I would like for the onsave macro not to run if the mpnth is later than that in b3. In other words after the last day of the month the macro no longer runs. What code should I add to accomplish this? Thanks Louise |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro expires
Hi Louise
One way is to use this function in a cell ( I use C3) to get the last day of the month =DATE(YEAR(B3),MONTH(B3)+1,0) And in the macro use this (first line) If Now Sheets("Sheet1").Range("C3").Value Then Exit Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Louise" wrote in message ... Hello I have a simple OnSave macro that that i have created. In cell b3 is the date (mm/dd/yy). I would like for the onsave macro not to run if the mpnth is later than that in b3. In other words after the last day of the month the macro no longer runs. What code should I add to accomplish this? Thanks Louise |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro expires
works great thanks!
"Ron de Bruin" wrote: Hi Louise One way is to use this function in a cell ( I use C3) to get the last day of the month =DATE(YEAR(B3),MONTH(B3)+1,0) And in the macro use this (first line) If Now Sheets("Sheet1").Range("C3").Value Then Exit Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Louise" wrote in message ... Hello I have a simple OnSave macro that that i have created. In cell b3 is the date (mm/dd/yy). I would like for the onsave macro not to run if the mpnth is later than that in b3. In other words after the last day of the month the macro no longer runs. What code should I add to accomplish this? Thanks Louise |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Encryption Password Expires in 30 Days | Excel Discussion (Misc queries) | |||
Date expires in 2 years | Excel Worksheet Functions | |||
Send mail when deadline expires | Excel Discussion (Misc queries) | |||
How to set up alarm for cell has entry as date when it expires? | Excel Worksheet Functions | |||
creating a demo that expires after time | Excel Programming |