Sub fencun() Application.ScreenUpdating = False b = Sheets.Count For i = 1 To b Sheets(i).Copy a = ThisWorkbook.Worksheets(i).Name With ActiveWorkbook .SaveAs Filename:=ThisWorkbook.Path & "\" & a & ".xlsx" .Close End With Next i Application.ScreenUpdating = true End Sub |
|