用VBS 把Excel 中的指定工作表,存成独立XLS 文件。

2024年11月23日 06:02
有1个网友回答
网友(1):

Dim A As Worksheet
For Each A In Worksheets
A.Activate
Cells.Select
Selection.Copy
Workbooks.Add
Cells.Select
ActiveSheet.Paste
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & A.Name & ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWindow.Close
A.Cells(1, 1).Select
Next