Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running VBA through task scheduler

Status
Not open for further replies.

LucasH

IS-IT--Management
Oct 28, 2003
93
US
Hi guys, I am stumped on this one.

Windows Server 2008, Office 2010

I have some vba code that exports a table to an Excel spreadsheet and then does some formatting (basically running Excel macro statements stored in an Access vba module). It normally runs fine but we are trying to automate it.

We scheduled it to run via task scheduler (calling the Access db and the macro) and it will run fine UNLESS we choose the option to run whether logged off or not. When using that selection, the Access db is able to export the spreadsheet, but hangs or goes no further with the formatting. When run with the "only run while logged in" selection, everything runs fine. It's like Excel won't execute the macro statements.

Both instances are running under the domain admin which is also a local administrator.

For some reason the security context is different when "run when logged on or off".

Any thoughts on the differences or why this is happening?
 


Hi,

I have never had success running a scheduled job using Excel and the windows scheduler.

However, I do run a scheduled job 3 times a day, seven days a week. I simply leave Excel open on my desktop and run using an internal OnTime procedure.

BTW, my process grabs data via ODBC, from several different databases, including Oracle, Access & Excel.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top