This breaks when I load the macro. Clicking the Connect button in the COM interface fixes it. I've tried different COM commands and they all fail.
Code: Select all
WinActivate, Microsoft Excel - Book1.xlsm
Sleep, 333
If (!IsObject(XL))
XL := ComObjCreate("Excel.Application")
XL.Range("D1").Select