title: How to copy data from one already opened excel file (Workbook1,Sheet1,cell A11) to another already opened excel file(workbook2,sheet1,A11)
body: <p>I have 2 different opened excel files i want to copy data from first to secound file using macro in the first excel file?</p>
  
  <p>I use this code but it does work when the two Workbooks are opened in 1 excel file
  when they are opened in two different excel files it says "Run time error 9" or something like this</p>
  
  <pre><code>Sub Macro2()
  
  Macro2 Macro
  
  Range("D5:L5").Select
  Selection.Copy
  Windows("New_SET_Data.xlsx").Activate
  Range("B7").Select
  Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
      False, Transpose:=True
  Windows("Original_SET_Data.xls").Activate
  
  End Sub
  </code></pre>
  
  <p>how to change the code so i will get data from workbook1 in excelfile "A" to workbook2 in excel file "B"</p>