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

2024-11-23 06:02:56
推荐回答(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