![]() |
Autorun macro by date
This is a repost as my one this morning doesn't appear to have saved,
so ap;ologies if I end up raising the same question twice. I have a macro called 'Update_Me'which I would like to run automatically on the first of each month (when excel is opened, obviously). How do I go about this? Thanks in advance Steve |
Try something like:
Sub Workbook_Open() Dim dToday As Date dToday = Now If Day(dToday) = 1 Then 'rest of code here End If End Sub --- Place this in ThisWorkbook module. HTH Jason Atlanta, GA "Steve" wrote: This is a repost as my one this morning doesn't appear to have saved, so ap;ologies if I end up raising the same question twice. I have a macro called 'Update_Me'which I would like to run automatically on the first of each month (when excel is opened, obviously). How do I go about this? Thanks in advance Steve |
Hi Jason
I tested this and it worked perfectly. Thank you. Steve |
All times are GMT +1. The time now is 01:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com