title: VBA, Renaming the relevant sheet in Excel
body: <p>I am using twice the command "Workbooks.Open Filename..." in order to open the file (which were already open the first time) from which to be copied from.</p>
  
  <p>Is there an other economical solution without mentioning it twice but instead refering to the already open workbook? Furtheremore, the command:   ActiveSheet.Name = "Spread" doesnt rename in the pasted sheet. It does so only when I bring that relevant Sheets in front. </p>
  
  <pre><code> Sub CopyAndPaste()
  
   Dim wb As Workbook
   Dim ws As Worksheet
  
   Set wb = Workbooks.Add
   Set ws = wb.Worksheets("Tabelle1")
  
   datDatum = Now
  
  
   Workbooks.Open        
   Filename:="C:\Users\........xls" *'the source file'*
  
   Sheets("Hypothekenbanken").Range("A11:P57").Copy
   ws.Range("A2").PasteSpecial
   ActiveSheet.Name = "Spread"
  </code></pre>