|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
请测试.rar
(58.22 KB, 下载次数: 6)
请测试,如有帮助,请送几朵小花。
- Sub SaveAs()
- Dim wb As Object
- Dim m, n As Integer
- Application.DisplayAlerts = False
- Worksheets("模板").Columns("A:L").Copy
- Set wb = Workbooks.Open(ThisWorkbook.Path & "\表格存档.xlsx")
- wb.Sheets.Add After:=Sheets(Sheets.Count)
- wb.Sheets.Add.Name = Sheets.Count
- Columns("A:A").Select
- Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
- SkipBlanks:=False, Transpose:=False
- ActiveSheet.Paste
- Windows("表格存档.xlsx").Visible = True
- wb.Save
- wb.Close
- Application.DisplayAlerts = True
- End Sub
复制代码
|
|