Code:
Set objStockList = CreateObject("Excel.Application")
    Set objStockListWB = objStockList.Workbooks.Open(StockListPathName, ReadOnly:=True)
    Set objStockListSH = objStockList.Sheets
    objStockList.Windows(1).Visible = False
Declare late bound so that any version of Excel, this is slower than early binding, not time critical. The late binding is to make this independent of Excel version.

This is used in an unattended program, thus no manual intervention is possible.
The first time this is attempted, the response is a message box indicating a choice of: "switch to" and "retry".

What can I do to avoid the unnecessary message box. The VB6 program losses focus, so it cannot send a "sendkeys".

Thanks,
Winnie-the-Pough" (sic)
"Good software like good food takes time to prepare"