将sheet批量保存为单独表格的代码

-
-
2022-06-09
Sub ExportSheets()
    Dim wsh As Worksheet
    Dim strPath As String
    strPath = ThisWorkbook.Path & "\"
    For Each wsh In ActiveWindow.SelectedSheets
        wsh.Copy
        With ActiveWorkbook
            .SaveAs strPath & wsh.Name & ".xlsx", FileFormat:=xlOpenXMLWorkbook
            .Close
        End With
    Next wsh
End Sub

“您的支持是我持续分享的动力”

微信收款码
微信
支付宝收款码
支付宝

东东
一个兴趣使然的人
公告

找个地方随便坐~
最新评论

加载中...