Jump to content

Executing Autoit code from Excel VBA


Recommended Posts

I am restating a topic that was not solved from >here (I am not sure what are the rules of restarting a already discussed topic)

 I am using the following code in VBA to run Autoitcode.au3 file.

Sub RunFileName()
Dim runscript
Dim FileName As String
FileName = ThisWorkbook.Path & "\Autoitcode.au3"

MsgBox (FileName)

runscript = Shell("C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe " & FileName)

End Sub

 

Link to comment
Share on other sites

Odd that you would have excel to drive autoit, rather than the other way around.  Like suggested on your other post, add " around the filename:

runscript = Shell('C:Program Files (x86)AutoIt3AutoIt3_x64.exe "' & FileName & '"')
 

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

  • Moderators

While I believe the only "rule" about re-posting is if your previous post was locked, it begs the question, why would you not just respond to Water's suggestion in your original post, explaining what didn't work for you, rather than starting a whole new thread? As jdelaney has pointed out, the suggestion is exactly the same. If this is not working for you, don't start a second thread, explain what the result is. Help us help you ;)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...