![]() |
Activate Different workbook?
I would like to copy a worksheet from an open workbook to my current
workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
Activate Different workbook?
Is the workbook in the same instance of Excel? If so, you would have to
automate that instance. Otherwise, if in the same instance than the approach would be: workbooks("t0983102.xls").worksheets(1).copy After:=Activeworkbooks.worksheets(ActiveWorkbook.w orksheets.Count) -- Regards, Tom Ogilvy "John" wrote in message ... I would like to copy a worksheet from an open workbook to my current workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
Activate Different workbook?
it is in a different instance of excel... is the best bet to close the file
and then open it in the same instance of excel? not sure I followed what you wrote either... "Tom Ogilvy" wrote: Is the workbook in the same instance of Excel? If so, you would have to automate that instance. Otherwise, if in the same instance than the approach would be: workbooks("t0983102.xls").worksheets(1).copy After:=Activeworkbooks.worksheets(ActiveWorkbook.w orksheets.Count) -- Regards, Tom Ogilvy "John" wrote in message ... I would like to copy a worksheet from an open workbook to my current workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
Activate Different workbook?
it is in a different instance of excel... is the best bet to close the file
and then open it in the same instance of excel? not sure I followed what you wrote either... ? "Tom Ogilvy" wrote: Is the workbook in the same instance of Excel? If so, you would have to automate that instance. Otherwise, if in the same instance than the approach would be: workbooks("t0983102.xls").worksheets(1).copy After:=Activeworkbooks.worksheets(ActiveWorkbook.w orksheets.Count) -- Regards, Tom Ogilvy "John" wrote in message ... I would like to copy a worksheet from an open workbook to my current workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
Activate Different workbook?
It is always much easier to work within the same instance of Excel.
-- Regards, Tom Ogilvy "John" wrote in message ... it is in a different instance of excel... is the best bet to close the file and then open it in the same instance of excel? not sure I followed what you wrote either... "Tom Ogilvy" wrote: Is the workbook in the same instance of Excel? If so, you would have to automate that instance. Otherwise, if in the same instance than the approach would be: workbooks("t0983102.xls").worksheets(1).copy After:=Activeworkbooks.worksheets(ActiveWorkbook.w orksheets.Count) -- Regards, Tom Ogilvy "John" wrote in message ... I would like to copy a worksheet from an open workbook to my current workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
Activate Different workbook?
Tom,
It would be great to be able to just copy a couple of cells in that different instance and close that file... I have tried things such as... AppActivate ("t0983102.xls - Microsoft Office excel") is there no way to do that? Thanks again. "John" wrote: it is in a different instance of excel... is the best bet to close the file and then open it in the same instance of excel? not sure I followed what you wrote either... ? "Tom Ogilvy" wrote: Is the workbook in the same instance of Excel? If so, you would have to automate that instance. Otherwise, if in the same instance than the approach would be: workbooks("t0983102.xls").worksheets(1).copy After:=Activeworkbooks.worksheets(ActiveWorkbook.w orksheets.Count) -- Regards, Tom Ogilvy "John" wrote in message ... I would like to copy a worksheet from an open workbook to my current workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
Activate Different workbook?
to work with that instance, you have to get a reference to it.
This is done with GetObject However, GetObject does not take an argument that would differentiate between multiple instances of Excel - at least not in any why that I know of. -- Regards, Tom Ogilvy "John" wrote in message ... Tom, It would be great to be able to just copy a couple of cells in that different instance and close that file... I have tried things such as... AppActivate ("t0983102.xls - Microsoft Office excel") is there no way to do that? Thanks again. "John" wrote: it is in a different instance of excel... is the best bet to close the file and then open it in the same instance of excel? not sure I followed what you wrote either... ? "Tom Ogilvy" wrote: Is the workbook in the same instance of Excel? If so, you would have to automate that instance. Otherwise, if in the same instance than the approach would be: workbooks("t0983102.xls").worksheets(1).copy After:=Activeworkbooks.worksheets(ActiveWorkbook.w orksheets.Count) -- Regards, Tom Ogilvy "John" wrote in message ... I would like to copy a worksheet from an open workbook to my current workbook. How do I activate a workbook that is open in another window? Windows("t0983102.xls").Activate doesn't work... |
All times are GMT +1. The time now is 07:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com