我在微停止中使用VBA来提出一个简单的发现&替换程序。我一直在和我的& Text_Find和&文本替换是。任何帮助将不胜感激。
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
答案 0 :(得分:1)
Find_text和Replace_text都是数组
您必须指定要使用的数组元素
可能是Find_text(i) Replace_text(j)