Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Activate Workbook | Excel Discussion (Misc queries) | |||
Workbook.activate | Excel Discussion (Misc queries) | |||
Activate Other Workbook | Excel Programming | |||
Activate Workbook | Excel Programming | |||
Activate Workbook | Excel Programming |