How to replace a sheet using VBA ?
<p>I'd like to copy a sheet from a workbook and paste it in the 2nd sheet in my active workbook. I'm new with vba, it doesn't seem difficult but my code doesn't work. The sheet, which is copied, is opened in a new workbook and not in my active workbook. </p>

<p>Thanks for your help ! </p>

<p>My code : </p>

<pre><code>Sub copyPaste()

  Dim classeur1 As Excel.Workbook
  Dim classeur2 As Excel.Workbook

  Set classeur1 = Workbooks.Open("Macintosh HD:Users:LouiseDhainaut:Documents:Stage:test_modifiable.xlsx")
  Set classeur2 = ThisWorkbook

  classeur1.Sheets(1).Copy
  classeur1.Sheets(1).Paste Destination:=ThisWorkbook.Sheets(2).Range("A1")


  classeur2.Save
  classeur1.Close

End Sub
</code></pre>