Run Macros from an excel to an especific spreadsheet HELP!!!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
starkscarecrow
Posts: 1
Joined: 16 Nov 2017, 14:49

Run Macros from an excel to an especific spreadsheet HELP!!!

16 Nov 2017, 14:55

Good Afternoon everyone, I'm kinda new using AutoHotKey and I was wondering, is there any way in which you create a script that can change the active sheet so the macros that was created on that Workbook works correctly?

btw the workbook is macros enabled.

I tried the following

!i::
xlFile := A_ScriptDir "\Templates.xlsm"
oExcel.Sheets("Ticket Creation Templates").Select
Macro := "Templates.xlsm!INCIDENT"
try xlApp := ComObjActive("Excel.Application")
catch
{
xlApp := ComObjCreate("Excel.Application")
xlApp.WorkBooks.Open(A_AppData "\Microsoft\Excel\XLSTART\PERSONAL.XLSB")
}
xlApp.Visible := true
xlApp.Run(Macro)
send, ^v
Return

However the macros created run in different layouts from the sheets.

please advise guys!!! I really appreaciate it

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, Frogrammer, Google [Bot] and 267 guests