balloon_tom
Thread Starter
- Joined
- Jan 4, 2006
- Messages
- 107
I have 2 Excel workbooks open at the same time, each within their own separate applications. Each was started using the following 2 shortcuts:
"C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" C:\FltTools\Book1_.xls
and
"C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" C:\FltTools\Book2_.xls.
Assume that Book2 has been modified since it's last save
and
Book1, which is active, needs a copy of the modified worksheet from Book2.
First, I'll check to see if Book2 is open, and then if not, open it:
On Error Resume Next
Windows(C:\FltTools\book2_.xls).activate
If Err.Number>0 then Workbooks.Open (C:\FltTools\Book2_.xls)
PROBLEM: Book1's application is not seeing that Book2 is already open, most likely because it is in a different application. So, this code opens a new instance of the last saved version of Book2 into Book1's application, and is then copying the older unmodified worksheet.
QUESTION: How can I code one application to search for an open workbook within a different application?
Thank you, Tom
"C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" C:\FltTools\Book1_.xls
and
"C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" C:\FltTools\Book2_.xls.
Assume that Book2 has been modified since it's last save
and
Book1, which is active, needs a copy of the modified worksheet from Book2.
First, I'll check to see if Book2 is open, and then if not, open it:
On Error Resume Next
Windows(C:\FltTools\book2_.xls).activate
If Err.Number>0 then Workbooks.Open (C:\FltTools\Book2_.xls)
PROBLEM: Book1's application is not seeing that Book2 is already open, most likely because it is in a different application. So, this code opens a new instance of the last saved version of Book2 into Book1's application, and is then copying the older unmodified worksheet.
QUESTION: How can I code one application to search for an open workbook within a different application?
Thank you, Tom