Autorun macro by date

S

Steve

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
 
J

Jason Morin

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
 
Top