ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Run a macro on a fixed date cycle (https://www.excelbanter.com/excel-discussion-misc-queries/23953-run-macro-fixed-date-cycle.html)

Steve

Run a macro on a fixed date cycle
 
Hi

Is there a way to run a macro - "Update_Me" - on a fixed date, say the
first of every month?

Thanks in advance

Steve


Neil

Steve,

There's no way to do waht you want without opening the workbook on that day.
If we assum you open the workbook everyday, the ideal way to achieve ehat you
want is to create ans 'Auto_exec' macro that performs a check on the date,
and then either exits doing nothing, or runs your update macro, depending on
the result of the date check.

Depending how volatile your source data is you may need to add some
validation and safety checks to ensure the macro is run only once per month,
but that should be fairly ewasy for anyone with some basic VBA knowledge.

HTH

Neil
www.nwarwick.co.uk

"Steve" wrote:

Hi

Is there a way to run a macro - "Update_Me" - on a fixed date, say the
first of every month?

Thanks in advance

Steve



Dave Peterson

Maybe you could use a windows scheduler that starts your workbook on certain
dates.

Then call your Update_me in the auto_open procedu

sub auto_Open()
call Update_Me
thisworkbook.close savechanges:=true 'maybe???
end sub



Steve wrote:

Hi

Is there a way to run a macro - "Update_Me" - on a fixed date, say the
first of every month?

Thanks in advance

Steve


--

Dave Peterson


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com