![]() |
Scheduling task to run for Excel Addin
I have been trying to figure out how to run our canned reports
utilizing the WIndows Task Scheduler. We currently run most of our canned reports in Excel with the Essbase Add-In and VBA. DOes anyone out there have any suggestions on how I can run these reports daily by scheduling them to run? |
Scheduling task to run for Excel Addin
- Create a macro that runs your reports. Lets' call the macro 'MyReports'.
- In the 'Workbook_Open() section of 'ThisWorkbook' put the following code... Private Sub Workbook_Open() Call MyReports End Sub - In the Windows Schedule, select this workbook. - At the scheduled time, the workbook will open and the 'MyReports' macro will automatically run. FYI, I put a time check in the macro to see if it's in the middle of the night. If so, when the macro's completed, it closes the workbook and Excel. Here's an example where I have something scheduled for 5:15 am... Public Const strTimeStart = "05:00:00" '5 am Public Const strTimeEnd = "05:30:00" '5:30 am MyReports() 'do stuff... 'check to see if Excel should close ' because it's so early in the morning If Time() TimeValue(strTimeStart) And _ Time() < TimeValue(strTimeEnd) Then Application.Quit Application.ActiveWorkbook.Close End If End Sub -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "DallasEssbase" wrote: I have been trying to figure out how to run our canned reports utilizing the WIndows Task Scheduler. We currently run most of our canned reports in Excel with the Essbase Add-In and VBA. DOes anyone out there have any suggestions on how I can run these reports daily by scheduling them to run? |
All times are GMT +1. The time now is 06:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com