1
由于某些原因,当我执行下面的代码时,出现'Runtime 13'错误。For循环中运行时错误13
Dim N_1 As Variant
Worksheets("Trucks").Activate
Range("G9").Activate
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value = "" Then Exit Do
Loop
ActiveCell.Offset(-1, 0).Select
N_1 = Range(ActiveCell, "G9")
With CreateObject("scripting.dictionary")
.comparemode = vbTextCompare
For Each v1 In N_1
If Not IsEmpty(v1) Then
If Not .exists(v1) Then .Add v1, Nothing
End If
Next
z1 = .keys
End With
美丽,感谢堆! – Delta
其实,我不确定这个答案对你有帮助。我会在编辑中解释 – barrowc