ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
I have a working Bat file which i run from an image on my userform.
Today i needed to add another image & also a Bat file.
I copied the original Bat file code but made an just changed the path etc to reflect the new programme.
My problem is when i click on the image nothing happens in respect of the programme running.
I do see a message.
Method run of object IWishShell3 Failed.
In the Bat file i have the following.
The macro code on my image is shown below.
When i debug this line is shown in yellow.
Today i needed to add another image & also a Bat file.
I copied the original Bat file code but made an just changed the path etc to reflect the new programme.
My problem is when i click on the image nothing happens in respect of the programme running.
I do see a message.
Method run of object IWishShell3 Failed.
In the Bat file i have the following.
Code:
echo
"C:\AutoDisc\epc\.exe"
The macro code on my image is shown below.
Code:
Sub OpenAutodisc()Set WshShell = CreateObject("WScript.Shell")
WshShell.Run Chr(34) & "C:\Autodisc\epc.Bat" & Chr(34), 0
Set WshShell = Nothing
End Sub
When i debug this line is shown in yellow.
Code:
WshShell.Run Chr(34) & "C:\Autodisc\epc.Bat" & Chr(34), 0