Error 800A9C68 running VBS using task scheduler

David Montoya

New Member
Joined
Apr 25, 2018
Messages
49
Gentlemen,

I am running this code via task scheduler, and the workbook is closed when it runs. At the end of the process, it gives me the following error; however, all the expected processes are perfect. I have also run the macro manually, and it works as expected. I suspect the VBS code has something wrong:

Script: "Location path of the VBS script"
Line: 2
Char: 1
Error: Unknown runtime error
Code: 800A9C68
Source: Microsoft VBSScript runtime error

The following is the code:
Code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'I:\Administration\Trade Compliance\Import Compliance\Trade Data\Daily Files\Master DB Daily Appends.xlsm'!Module7.Trade_Data_Daily_Process"
objExcel.DisplayAlerts = False
objExcel.Application.Quit
Set objExcel = Nothing

Thanks in advance for your assistance.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Gentlemen,

I am running this code via task scheduler, and the workbook is closed when it runs. At the end of the process, it gives me the following error; however, all the expected processes are perfect. I have also run the macro manually, and it works as expected. I suspect the VBS code has something wrong:

Script: "Location path of the VBS script"
Line: 2
Char: 1
Error: Unknown runtime error
Code: 800A9C68
Source: Microsoft VBSScript runtime error

The following is the code:
Code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'I:\Administration\Trade Compliance\Import Compliance\Trade Data\Daily Files\Master DB Daily Appends.xlsm'!Module7.Trade_Data_Daily_Process"
objExcel.DisplayAlerts = False
objExcel.Application.Quit
Set objExcel = Nothing

Thanks in advance for your assistance.
I'm also using the same code and getting the same error. did you find any solution?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top