Copying and Pasting.

  • Thread starter Thread starter Guest
  • Start date Start date
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)
 
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
 
Back
Top