I am currently bringing in data from ofrom one document to another using the code below.
Workbooks.Open ("C:\AE\Record.xlsm")
Dim wkb As Workbook
Set wkb = Workbooks.Open("C:\AE\Record.xlsm") ' open workbook and set reference!
wkb.Sheets("Database").Activate
However, if the document is already open i get a message box telling me that i cant reopen it. Is there a way to get excel to check if the document is already open and if not open it and make the sheet "Database" the active sheet?.
My code is currently in module 4.
Regards
Workbooks.Open ("C:\AE\Record.xlsm")
Dim wkb As Workbook
Set wkb = Workbooks.Open("C:\AE\Record.xlsm") ' open workbook and set reference!
wkb.Sheets("Database").Activate
However, if the document is already open i get a message box telling me that i cant reopen it. Is there a way to get excel to check if the document is already open and if not open it and make the sheet "Database" the active sheet?.
My code is currently in module 4.
Regards