cmccabe1
11-30-2015, 11:39 AM
I am trying to call the command prompt, execute a java script and have a message displayed upon completion.
However I am getting a
Method 'Run' of Object 'IWshShell3' failed
I can not seem to fix it. Thank you :).
MsgBox ("ImaGene running, please wait")
Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean: waitOnReturn = True
Dim windowStyle As Integer: windowStyle = 1
wsh.Run "C:\Program Files\BioDiscovery\ImaGene 9.0\ImaGene.exe"" batch " _
& XML-*File*-Name, windowStyle, waitOnReturn
MsgBox ("ImaGene completed")
I have also tried:
Shell "C:\Program Files\BioDiscovery\ImaGene 9.0\ImaGene.exe -batch ""C:\Users\cmccabe\Desktop\EmArray\Design\imagene.bch"" /A" and that seems to execute the command but there are no results
However I am getting a
Method 'Run' of Object 'IWshShell3' failed
I can not seem to fix it. Thank you :).
MsgBox ("ImaGene running, please wait")
Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean: waitOnReturn = True
Dim windowStyle As Integer: windowStyle = 1
wsh.Run "C:\Program Files\BioDiscovery\ImaGene 9.0\ImaGene.exe"" batch " _
& XML-*File*-Name, windowStyle, waitOnReturn
MsgBox ("ImaGene completed")
I have also tried:
Shell "C:\Program Files\BioDiscovery\ImaGene 9.0\ImaGene.exe -batch ""C:\Users\cmccabe\Desktop\EmArray\Design\imagene.bch"" /A" and that seems to execute the command but there are no results