详见附件
代码如下:
Sub test()
Dim wb As Workbook, rg As Range
Worksheets("Sheet1").Copy
Set wb = ActiveWorkbook
With wb
For Each rg In .Worksheets("Sheet1").UsedRange
rg = rg
Next
End With
f = "D:\" & wb.Worksheets("Sheet1").[i2] & ".xlsx"
wb.SaveAs f
wb.Close
End Sub
本回答被提问者采纳