Autorun macro by date

  • Thread starter Thread starter Steve
  • Start date Start 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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top