Excel正在崩溃' ws.Copy'
下面的代码行详细说明:
我尝试过的事情:
Option Explicit
...
Function Copy_Template(dict As Collection)
Dim strKey As Variant
Dim ws As Worksheet
Set ws = Sheets("Template")
For Each strKey In dict
If strKey <> "" Then
' Windows machine is crashing at this line for no reason!!!
ws.Copy After:=Sheets("Summary")
ActiveSheet.Name = strKey
End If
Next
End Function