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

Get help with using AutoHotkey and its commands and hotkeys
starkscarecrow
Posts: 1
Joined: 16 Nov 2017, 14:49
Facebook: http://fb.com/starkscarecrow

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”

Who is online

Users browsing this forum: john_c, mikeybea2, Yatendra3192 and 50 guests