2010-12-31 11 views

Respuesta

19

Puede utilizar InStr función como esta:

Dim position As Integer 

position = InStr(1, stringToSearch, stringToFind) 

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

Uso InStr:

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

+1 pero por qué no vincular a la entrada manual de VB6 para 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 
Cuestiones relacionadas