将工作表分隔为单独的文件
嗨我正在使用代码
Sub Split_Sheet_into_ExcelFiles()
Dim FilePath As String
FilePath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each Sheet In ThisWorkbook.Sheets
Sheet.Copy
Application.ActiveWorkbook.SaveAs Filename:=FilePath & "\" & Sheet.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
它创建了相同的文件,但我试图将多个工作表拆分成单独的文件。知道我输入错误吗?谢谢
1条答案
按热度按时间bfhwhh0e1#
将每张图纸导出到单个文件