Copying and Pasting.

G

Guest

I have to instances of excel. I want to copy from one instance of Excel and
Paste to another. I'm attempted the following code, which has worked fine
when working with one instances of excel. However, I get "object doesn't
support property or method " when trying it here.

Excel1.ThisWorkbook.Sheets(1).Cells(1, 1).Copy _
Excel2.ActiveWorkbook.ActiveSheet.Cells(1, 1)
 
G

Guest

Even though you're running two instances of Excel, the operating system
considers them two, unique Microsoft Office applications. It's as though you
were trying to connect Word with Excel. You'll have to check all of the
software linkages (object definitions, assignments, etc) so that Excel_1 can
identify and then talk to Excel_2. Your code example, as written, is the
right idea but you should think of that as a macro-statement. Now, you have
to put together the details.

Steve in Ohio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top