Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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...




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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...




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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...








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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...




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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...





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activate Workbook Dolphinv4 Excel Discussion (Misc queries) 2 October 22nd 05 01:45 PM
Workbook.activate Jeff Excel Discussion (Misc queries) 1 December 13th 04 10:22 PM
Activate Other Workbook pauluk[_37_] Excel Programming 16 April 20th 04 07:02 PM
Activate Workbook Molly Johnson Excel Programming 1 February 10th 04 05:09 PM
Activate Workbook Fred[_16_] Excel Programming 1 December 2nd 03 05:15 PM


All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"