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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel object not created when running as a different user

Status
Not open for further replies.

jday05

Programmer
Jan 8, 2004
1
US
I have a program that creates an Excel spreadsheet and then saves it. I've compiled it and it runs with no problems on my computer. I've set it up as a scheduled task on my computer under my id (my computer is on an active directory domain), and it works properly. The problem I've run into is when I set the scheduled task to run under a different user id. When I do this, the program starts, but once it gets to the point of creating the Excel application object, it doesn't do anything. The program is still running, but at that point it is effectively stopped.

I've tried using 'Set xlsApplication = CreateObject("Excel.Application")' and 'Set xlsApplication = New Excel.Application', but the program stops in at the same position either way. The user I'm trying to run the program as has a profile set up on the computer and is able to login and run the program with no problems. I am also able to run the program successfuly using the "run as..." service. Any idea why the Excel application is never opened/created?
 
Hi
If it's an ActiveX, you could configure DCOM and make it run with your user. (You say it works fine so)

What do you think?

Good luck!
;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top