2010-12-31 2 views

Odpowiedz

19

Można użyć InStr funkcja tak:

Dim position As Integer 

position = InStr(1, stringToSearch, stringToFind) 

If position > 0 Then 
    ' text is inside 
Else 
    ' text is not inide 
End If 
14

Zastosowanie InStr:

If InStr(text1, text2) > 0 Then 
+0

+1 ale dlaczego nie odwołuje się do wejścia ręcznego VB6 dla Instr http://msdn.microsoft.com/en-us/library/aa445031(v=VS. 60) .aspx – MarkJ

2
RTM = InStr(1, text1,text2) 

if RTM > 0 then debug.print "Text2 was found at position: "; RTM 
Powiązane problemy