I get a type mismatch out of this code, if anyone can help that would be greatly appreciated. It probably has to do with where i used the split command.. i am trying to basically grab A2 and B2 then A3 and B3 and so on... to put it in another program (Microstation)
Sub Main()
Dim Find_text() As Variant
Dim Replace_text() As Variant
Dim objExcelApp As Object
Dim wb As Object
Set objExcelApp = CreateObject("Excel.Application")
Set wb = objExcelApp.Workbooks.Open("My path")
Dim ws As Object
Set ws = wb.Sheets(1)
Find_text = Split(ws.Range("A2:A628"))
Replace_text = Split(ws.Range("B2:B628"))
CadInputQueue.SendKeyin "MDL KEYIN FINDREPLACETEXT,CHNGTXT CHANGE DIALOGTEXT"
For i = 0 To UBound(Find_text)
CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING " & Find_text(i)
CadInputQueue.SendKeyin "FIND DIALOG REPLACESTRING " & Replace_text(i)
CadInputQueue.SendKeyin "CHANGE TEXT ALLFILTERED"
Next
End Sub