SpitWorkSheetsInFiles.vba 416 B

1234567891011121314
  1. Sub Splitbook()
  2. 'Updateby20140612
  3. Dim xPath As String
  4. xPath = Application.ActiveWorkbook.Path
  5. Application.ScreenUpdating = False
  6. Application.DisplayAlerts = False
  7. For Each xWs In ThisWorkbook.Sheets
  8. xWs.Copy
  9. Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
  10. Application.ActiveWorkbook.Close False
  11. Next
  12. Application.DisplayAlerts = True
  13. Application.ScreenUpdating = True
  14. End Sub