I have a macro that runs on a server as scheduled through scheduled tasks. The server has Excel 2003 loaded.
Here is the problem: When I open the file directly (by double-click), the macro runs and updates a series of queries (to an access db) and does some recalculations. It is then set to save and close. Everything works fine. Now, when it runs on the schedule, it will open and run the macro the same way (i have watched this run automatically) and appears the same way as the manual open but the data from the db does not get updated. Any ideas??? I have posted the code below. Thanks in advance for any help.
Private Sub Workbook_Open()
Application.DisplayAlerts = False
ThisWorkbook.RefreshAll
<Misc. Recorded Macro operations here>
Application.Calculate
Application.Wait Now + TimeValue("00:00:30")
ThisWorkbook.Save
Application.Quit
End Sub
Bookmarks