如何把1个excel工作簿中的sheet快速拆分?
发布网友
发布时间:2022-04-23 00:22
我来回答
共1个回答
热心网友
时间:2023-09-22 13:24
Private Sub 分拆工作表()
Dim p$
Dim sht As Worksheet
p = ActiveWorkbook.Path
For Each sht In MyBook.Sheets
sht.Copy
ActiveWorkbook.SaveAs p & "\" & sht.Name & ".xlsx"
ActiveWorkbook.Close
Next
MsgBox "文件已经被分拆完毕!"
End Sub