Sub test()
Dim A, p$, i%
Application.ScreenUpdating = False
Application.DisplayAlerts = False
A = ThisWorkbook.Sheets(1).Range("a1").CurrentRegion
p = ThisWorkbook.Path & "\"
For i = 2 To UBound(A)
With Workbooks.Open(p & "评价模板.xls")
With .Sheets(1)
.Cells(3, 1) = A(i, 3) '学生姓名
.Cells(3, 2) = A(i, 6) '学籍号
.SaveAs p & A(i, 6) & A(i, 3)
End With
.Close
End With
Next i
MsgBox "完成"
End Sub
评价2.rar
(15.11 KB, 下载次数: 29)