How can i speed up this Function?
Code:Public Function InString(text As Variant, String1 As String) As Integer Dim y As Integer Dim x As Integer Dim i As Integer If String1 = "" Then InString = 0 Exit Function End If For i = 1 To UBound(text) DoEvents x = InStr(1, text(i), String1) If x <> 0 Then y = y + 1 End If Next i InString = y End Function
Edited to add code tags
[Edited by Bjwbell on 11-27-2000 at 11:23 PM]




Reply With Quote