title: How to switch between workbooks
body: <p>I have problem with switching between workbooks. Could you take a look at code and say what is wrong with attitude to problem which i am trying? Or propose some other way to do this.</p>
  
  <pre><code>Sub copy_spreadsheets()
  
  Dim wb As Workbook, wb_main As Workbook, path As String, sheet_name As String, x As Integer, i As Integer, source_sheet As Worksheet, ws As Worksheet
  
  path = "C:\Users\me\Desktop\folder\"
  Set wb_main = ThisWorkbook
  For x = 2 To 10
  i = 2
  sheet_name = ("sheet" &amp; i &amp; ".xlsx")
  Set wb = Workbooks.Open(path &amp; sheet_name)
  Set sourceSheet = Worksheets("sheet1")
  sourceSheet.Activate
  sourceSheet.Cells.Select
  Selection.Copy
  Workbooks("C:\Users\me\Desktop\folder\sheet1.xls").Worksheets("Sheet1").Activate
  Set ws = Sheets.Add
  
  i = i + 1
  Next x
  
  
  End Sub
  </code></pre>