使用过滤功能时出现类型不匹配的问题。我传递一个字符串来猜测除了if语句正常工作之外的所有内容。谁知道问题是什么?
Private Function perform_word(guess As String)
Dim area As Range
Dim hold_split() As String
Dim check_sum As String
Dim rng As String
Set area = Range("A1:G7")
ReDim hold_split(1 To Len(guess))
For i = 1 To Len(guess)
hold_split(i) = Mid(guess, i, 1)
Next i
For i = 1 To area.Rows.Count
For j = 1 To area.Columns.Count
rng = area(i, j).Value
If rng = Filter(hold_split, rng) Then <<<<---- type mismatch here :(
End If
Next j
Next i
If check_sum = guess Then
Debug.Print check_sum
End If
perform_word = hold_split
End Function