
代码如下:
Public Sub copy_table()
    Sheets("日报表模板").Visible = True
    
    Sheets("日报表模板").Copy after:=Sheets(Sheets.Count)
    
    Set sh = ActiveSheet
        
        sh.Name = CStr(Sheets.Count - 2) & "日报表"
    
    Sheets("日报表模板").Visible = False
    
End Sub
Public Sub saveas_table()
    Dim ipath As String, sht As Worksheet, str_name As String, x As Integer
    
    Application.ScreenUpdating = False
    
    ipath = ThisWorkbook.Path & "\"
    
    For x = 3 To Sheets.Count
        Sheets(x).Copy
        
        Set wb = ActiveWorkbook
        wb.SaveAs ipath & Sheets(x).Name & ".xlsx"
            
        wb.Close True
        
    Next
    Application.ScreenUpdating = True
End Sub
有问题欢迎大家交流进步,邮箱xgf05191995@gamil.com
来源:CSDN
作者:奈何帅气是沧桑
链接:https://blog.csdn.net/weixin_40112836/article/details/104672596