![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 1
|
Please help!
I need to accomplish a task, which executes an excel macro automatically every month. Any advice on how to do it? Sample code would be very helpful. Thanks. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
You could try this code which would run your macro if the workbook is opened on the first of a month (adapt it to your own needs): -
Private Sub Workbook_Open() If Day(Now) = 1 Then Call YourMacro End Sub To enter it, go into the VB editor, click on the 'Workbook' entry in the Project Explorer in the left pane and paste in the above. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|