title: Copy Active sheet of all workbooks in a folder to a new workbook
body: <p>Hi I have the following code to copy all worksheets of all workbooks in a given folder to a single workbook. I need to modify this code to copy only the active sheet on all workbooks (now it copies all the sheets). Can you help me with this?</p>
  
  <pre><code>Option Explicit
  
  Sub CombineFiles()
  
  Dim Path            As String
  Dim FileName        As String
  Dim Wkb             As Workbook
  Dim WS              As Worksheet
  
      Application.EnableEvents = False
      Application.ScreenUpdating = False
      Path = "C:\" 'Change as needed
      FileName = Dir(Path &amp; "\*.xlsx", vbNormal)
      Do Until FileName = ""
          Set Wkb = Workbooks.Open(FileName:=Path &amp; "\" &amp; FileName)
          For Each WS In Wkb.Worksheets
              WS.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
          Next WS
          Wkb.Close False
          FileName = Dir()
      Loop
      Application.EnableEvents = True
      Application.ScreenUpdating = True
  
  End Sub
  </code></pre>