I am seeing that the ComObjActive("Excel.Application") command is only creating a handle for workbooks contained in the first instance of Excel. It is very often useful for me to compare Excel sheets side-by-side, which is why I find myself starting multiple instances of Excel.
These lines of script are what I have used to see this symptom:
Xl := ComObjActive("Excel.Application") ;handle Xl.Visible := True ;by default excel sheets are invisible Xl.Range("A1").Value := "hello world!" ;set cell 'A1' to a string
Let's say there are two instances of Excel. Instance one has two workbooks open (WB1-1, WB1-2) and instance two only has one workbook (WB2). If I give WB1-1 focus, then give WB2 focus, then use the hotkey, "hello world" is written to WB1-1. If I give WB1-2 focus, then give WB2 focus, then use the hotkey, "hello world" is written to WB1-2.
Has anybody seen similar behavior and/or know how to get around this? BTW, I am using Excel 2010 on Windows 7.