|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub test()
Application.ScreenUpdating = False
Set sh = ThisWorkbook.Worksheets(1)
Set sht = ThisWorkbook.Worksheets("模板")
ar = sh.[a1].CurrentRegion
For i = 2 To UBound(ar)
If Trim(ar(i, 1)) <> "" Then
sht.Copy
With ActiveWorkbook.Worksheets(1)
.[c2] = ar(i, 3)
.[G2] = ar(i, 4)
.[C6] = ar(i, 5)
End With
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & ar(i, 3)
ActiveWorkbook.Close
End If
Next i
Application.ScreenUpdating = False
MsgBox "ok!"
End Sub
您好,不知道卡在” ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & ar(i, 3)“这里,然后弹出无效过程调用或参数“的提示,请问知道什么原因吗?@3190496160 |
|