I have the following VBA code to open an Excel file from Word. I would like the code to check if the file is open already, and if so then just set the focus to that file.
Dim xlApp As Object
Dim xlWB As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Open("C:\file.xlsm")