Pass array from ahk to VBA
Posted: 17 Dec 2017, 09:04
Hi Everyone,I have a puzzle that stuke me for a long time.I want interactive between Excel and AHK。when I want to pass the array object from ahk to vba,I failed.the code was below,so how to pass the array object between them ?
Thx for everyone!
Code: Select all
=========================ahk======================
5::
arr:=array("A","B","C")
ComObjActive("excel.application").run("Joinarr",arr)
return
===========================vba====================
Function Joinarr(arr)
For Each a In arr
s = s + "-" + a
Next
Joinarr = s
End Function