I am working in an excel workbook and have written code in VBA to open another excel workbook and do some task. Pretty easy to open the file. See below.
Workbooks.Open Filename:= _
"c:\ABC.xls"
The problem I am having is that the next time I run my routine VBA wants to open the "ABC" file which is already open.
Questions: Is there code to check if the excel file is already open before trying to open a new file and if it is open to make it the active workbook?
Any support would be great. This is my first VBA project!
Workbooks.Open Filename:= _
"c:\ABC.xls"
The problem I am having is that the next time I run my routine VBA wants to open the "ABC" file which is already open.
Questions: Is there code to check if the excel file is already open before trying to open a new file and if it is open to make it the active workbook?
Any support would be great. This is my first VBA project!