Run-time error 2147024894

TKoczkodan

New Member
Joined
Aug 21, 2009
Messages
3
Hello,

Hoping someone can help me with this. I am attempting to run a script from Excel that saves an exported report from SAP in a given location. This code runs without issue on several computers. When I emailed the code to a coworker they kept getting this error:

Run-time error '-2147024894 (80070002)':

Method 'Run' of object 'IWshShell3' failed

The code stops each time at the line in bold:

Code:
some script...
session.findById("wnd[0]/usr/ctxtSP$00008-LOW").Text = frDate
session.findById("wnd[0]/usr/ctxtSP$00008-HIGH").Text = toDate
session.findById("wnd[0]/usr/ctxtSP$00001-LOW").caretPosition = 4
session.findById("wnd[0]").sendVKey 8

Path = "C:\Users\212327875\Desktop\PlantWorkSheets\SQ00Temp.XLSX"
Set wshell = CreateObject("WScript.Shell")
[B]wshell.Run """C:\Users\212327875\Desktop\PlantWorkSheets\save_as.vbs""" & Path[/B]

Both computers are running the same OS (Windows 7 Professional, 64 bit)

Any help would be appreciated! Thanks!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I have solved the issue myself.

In case anyone is wondering though, the run-time error, decoded, literally means "FILE NOT FOUND".

The file in this case is save_as.vbs, which i did not install on the other computer.
 
Upvote 0

Forum statistics

Threads
1,215,582
Messages
6,125,660
Members
449,247
Latest member
wingedshoes

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