The following suggested macro works great with respect to activating an open Excel workbook when Access recognizes the appropriate Excel instance. Unfortunately, more often
than not, my opened Excel document is apparently in an instance that Access does not recognize. Is there any code that can help sort thru all open instances of Excel in search of an open Excel Workbook? Or, is there some other workaround to this problem
Thank you for any help.
Dim XLApp As Excel.Application
Dim WB As Excel.Workbook
Dim NumWkBks As Integer
Set XLApp = GetObject(, "Excel.Application"
NumWkBks = Workbooks.Count
For Each WB In XLApp.Workbooks
If WB.Name = "C:\MyDocuments\MyExcel.xls" Then
Sheets(1).Select
End If
Next WB