|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub 表另存簿()
Dim sh As Worksheet, path$, ss$
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show Then
strPath = .SelectedItems(1)
Else
Exit Sub
End If
End With
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets(Array("1", "2", "3")):
sh.Copy
ss = InputBox("请输入新表名称:", "提示", "表")
ActiveSheet.Name = ss
ActiveWorkbook.SaveAs Filename:=path & sh(ss).Name & ".xls"
ActiveWorkbook.Close
Next
Application.ScreenUpdating = True
End Sub |
|