Davesexcel
Davesexcel

Reputation: 6984

Run AHK script from excel successfully

When trying to run a AHK script from excel the 1st way using shell

Sub FrmShell()
Shell ("C:\Program Files\AutoHotkey\AutoHotkey.exe  \\REG-MITEK\Mitek\Mitek\documentation\RequestForQuote\old-RFP\RFP.exe")
End Sub

I get this error

enter image description here

When I run it with FollowHyperlink, it works but can't get away from the dreaded hyperlink warning.

Sub FromHyperLink()
Dim s As String    
s = "\\REG-MITEK\Mitek\Mitek\documentation\RequestForQuote\old-RFP\RFP.exe"    
ThisWorkbook.FollowHyperlink (s)
End Sub

Upvotes: 0

Views: 645

Answers (1)

Vitaliy Prushak
Vitaliy Prushak

Reputation: 1162

As per comment, posting an answer:

Check that statement - you're trying to open one application with another, as far as I know - the syntax should be "Application_path fileToOpen_path".

Possible decisions for #3 (requires registry access):

Circumvent Hyperlink Security Warning

and

here

But I didn't try neither.

Upvotes: 1

Related Questions