既然都可以说得那么清楚,我就把说明与注意点,直接备注在代码中了,完整代码如下
Sub admin()
Dim xWk As Workbook, xSh As Worksheet, xRan As Range
Dim nWk As Workbook
'要复制内容为当天工作表
Set xWk = ActiveWorkbook
Set xSh = ActiveSheet
'保存的文件名为A1单元格里的内容,如果是其它单元格,修改这里
Set xRan = xSh.Range("A1")
Set nWk = Workbooks.Add
xSh.Cells.Copy
nWk.Worksheets(1).Range("A1").PasteSpecial xlPasteValues
'保存在与复制内容同一目录下
nWk.SaveAs xWk.Path & "\" & xRan.Value
End Sub