我试图找到一种方法来删除数组中的重复值。 这是我到目前为止的代码,它没有问题填充数组。
Dim Filename As String
Dim Filenames(0 To 100) As String
Dim i, x As Integer
Dim Path As String
For i = 2 To 10
If Cells(i, 2).Interior.ColorIndex = 43 Then
Filename = Path + Sheet1.Cells(i, 1)
x = x + 1
Filenames(x) = Filename
End If
Next i