Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Boba
 
Posts: n/a
Default Copy data between 2 instances of Excel

Hello,

I have 2 windows of Excel with data. The data are
separated (not in one workbook). I would like to copy the
data from one Excel to another via VBA or Macro.
How can I do that ?

Thanks

  #2   Report Post  
HiArt
 
Posts: n/a
Default


If you look at the Object Model you'll see that Workbook is a
collection. Any open workbook should be part of that collection. So, if
you only have these 2 books open you should be able to switch from
workbook(1) to workbook(20, using the sheets collection, and the cells
collection, ranges, etc to grab the data from one book and copy or move
this to the other.

E.g.

Workbooks(1).Sheets("Sheet1).Range("A1:C50").copy
Workbooks(2).Sheets("Sheet1)Range("A1").Paste

Something like that from memory anyway. use VBA Help for the workbooks
collection and you'll get the general idea.

HTH

Art


--
HiArt
------------------------------------------------------------------------
HiArt's Profile: http://www.excelforum.com/member.php...o&userid=19953
View this thread: http://www.excelforum.com/showthread...hreadid=345847

  #3   Report Post  
 
Posts: n/a
Default

Hello,

You are right, but my situation is different. I have
two Excel open. If it was one Excel open with two
workbooks you was right. But in my situation - One
Excel doesn't know the other. So I do not have access to
its workbooks.
Thanks anyway... if you have any other solution I
will appreciate if you send it.

Thanks


-----Original Message-----

If you look at the Object Model you'll see that Workbook

is a
collection. Any open workbook should be part of that

collection. So, if
you only have these 2 books open you should be able to

switch from
workbook(1) to workbook(20, using the sheets collection,

and the cells
collection, ranges, etc to grab the data from one book

and copy or move
this to the other.

E.g.

Workbooks(1).Sheets("Sheet1).Range("A1:C50").co py
Workbooks(2).Sheets("Sheet1)Range("A1").Paste

Something like that from memory anyway. use VBA Help for

the workbooks
collection and you'll get the general idea.

HTH

Art


--
HiArt
---------------------------------------------------------

---------------
HiArt's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=19953
View this thread:

http://www.excelforum.com/showthread...hreadid=345847

.

  #4   Report Post  
CyberTaz
 
Posts: n/a
Default

Hello Boba-

I'm replying more out of curiosity than anything else, and was wondering why
there are 2 "instances" of Excel running in the first place. I am truly at a
loss as to what benefit this offers. It has always been stressed to me that
this is something to be avoided for numerous reasons, all of which make sense.

If you could more fully explain what your ultimate goal is, perhaps someone
could offer some useful suggestions.

Thanks |:)

"Boba" wrote:

Hello,

I have 2 windows of Excel with data. The data are
separated (not in one workbook). I would like to copy the
data from one Excel to another via VBA or Macro.
How can I do that ?

Thanks


  #5   Report Post  
Boba
 
Posts: n/a
Default

Hello,

You're absolutly right - 2 instances of Excel didn't
make any benefit But in out place there is a software
which have the feature to export the data to Excel via
the automation. I don't have any control on that software.
When I export twice I got two Excels open. Now I have to
comapre the data between them - The question is How can I
do it ?

Thanks.

-----Original Message-----
Hello Boba-

I'm replying more out of curiosity than anything else,

and was wondering why
there are 2 "instances" of Excel running in the first

place. I am truly at a
loss as to what benefit this offers. It has always been

stressed to me that
this is something to be avoided for numerous reasons,

all of which make sense.

If you could more fully explain what your ultimate goal

is, perhaps someone
could offer some useful suggestions.

Thanks |:)

"Boba" wrote:

Hello,

I have 2 windows of Excel with data. The data are
separated (not in one workbook). I would like to copy

the
data from one Excel to another via VBA or Macro.
How can I do that ?

Thanks


.



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

I would close one instance and open that workbook in the remaining instance.

I could copy and paste between two different instances, but my formulas were
lost. (xl2003/winXP).

Maybe that's not a problem for you.

Boba wrote:

Hello,

You're absolutly right - 2 instances of Excel didn't
make any benefit But in out place there is a software
which have the feature to export the data to Excel via
the automation. I don't have any control on that software.
When I export twice I got two Excels open. Now I have to
comapre the data between them - The question is How can I
do it ?

Thanks.

-----Original Message-----
Hello Boba-

I'm replying more out of curiosity than anything else,

and was wondering why
there are 2 "instances" of Excel running in the first

place. I am truly at a
loss as to what benefit this offers. It has always been

stressed to me that
this is something to be avoided for numerous reasons,

all of which make sense.

If you could more fully explain what your ultimate goal

is, perhaps someone
could offer some useful suggestions.

Thanks |:)

"Boba" wrote:

Hello,

I have 2 windows of Excel with data. The data are
separated (not in one workbook). I would like to copy

the
data from one Excel to another via VBA or Macro.
How can I do that ?

Thanks


.


--

Dave Peterson
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
How do I create a list in excel that contains external data? bill@bb Excel Discussion (Misc queries) 1 February 15th 05 03:45 AM
How do i copy columns of data in notepad into microsoft excel? JP New Users to Excel 2 February 10th 05 10:47 PM
Lookup Access data in Excel Chris Kellock Excel Worksheet Functions 1 December 28th 04 02:51 PM
stop excel from shifting cells up when a query returns no data DrLostinExcel Excel Worksheet Functions 2 November 9th 04 06:44 PM
getting data from 2 excel sheets automatically pinar Excel Worksheet Functions 0 November 9th 04 12:47 PM


All times are GMT +1. The time now is 10:19 PM.

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"