- Sub sheets2excels()
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- Dim XSheet As Worksheet
- For Each XSheet In ActiveWorkbook.Sheets
- XSheet.CopyActiveWorkbook.SaveAs
- Filename:=ThisWorkbook.Path & "\" & ActiveSheet.Name & ".xls"
- ActiveWindow.Close
- Next
- Application.ScreenUpdating = True
- End Sub
将以上代码复制,打开你的Excel,同时按下Alt+F11(或者开发工具里面的“查看代码”),
在工程窗口(左上)中双击ThisWorkbook,在右边空白处粘贴刚才复制的代码,单击代码中的某一行,再单击工具栏(上面)上的向右三角形,OK.