尝试在 sendkeyin 命令中获取变量时类型不匹配

Type mismatch, when trying to get a variable in the sendkeyin command

我在 microstation 中使用 VBA 来创建一个简单的查找和替换程序。我的 & Text_Find 和 & Text Replace 所在的位置一直出现类型不匹配。任何帮助将不胜感激。

Sub Main()


Dim Find_text() As String
Dim Replace_text() As String

Find_text = Split("20.50 35.43", " ")
Replace_text = Split("12.5 43.55", " ")

'   Start a command

    CadInputQueue.SendKeyin "MDL KEYIN FINDREPLACETEXT,CHNGTXT CHANGE DIALOGTEXT"

For i = 0 To UBound(Find_text)
    For j = 0 To UBound(Replace_text)

    MsgBox Find_text
    MsgBox Replace_text

    CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING" & Find_text

    CadInputQueue.SendKeyin "FIND DIALOG REPLACESTRING" & Replace_text

    CadInputQueue.SendKeyin "CHANGE TEXT ALLFILTERED"


    Next
Next

End Sub

Find_text 和 Replace_text 都是数组
您必须指定要使用的数组元素
大概Find_text(i) Replace_text(j)