将文件另存为工作簿

'FileSaveAsWorkBook
'将文件另存为工作簿

Sub QuotationSaveAs()
Dim strNum
Application.DisplayAlerts = False
ClosetbAndlb
Set wb = ActiveWorkbook

'Range(Cells(1, 1), Cells(1, L)).Copy Sheets("工资条").Range("A" & k)
ss = ThisWorkbook.path
With wb
'shname = wb.Worksheets("Quotation")
.Worksheets("Quotation").Copy
strNum = Format(Now(), "yyyyMMddhhssmm")
For Each shp In ActiveSheet.Shapes
s = shp.Name
If shp.Type = 8 Then shp.Delete
Next
ActiveWorkbook.SaveAs Filename:=ss & "\" & .Worksheets("Quotation").Name & strNum & ".xlsx"
End With
'ActiveWindow.Close
ActiveWorkbook.Close

Shell "Explorer " & ss, 1
MsgBox "OK"
Application.DisplayAlerts = True
End Sub

posted @ 2022-11-17 20:38  依云科技  阅读(45)  评论(0)    收藏  举报