Pass array from ahk to VBA

Get help with using AutoHotkey and its commands and hotkeys
zhanglei1371
Posts: 19
Joined: 05 Aug 2014, 02:01

Pass array from ahk to VBA

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 ?

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
Thx for everyone!

Return to “Ask For Help”

Who is online

Users browsing this forum: BitcoinVirus, teadrinker and 280 guests