Actually, you'd ordinarily use:
Code:
Sub Demo()
Dim i As Long
For i = 0 To UBound(splitslash)
If splitslash(i) Like "*[/]*" Then
Range("H4").Value = splitslash(i)
Exit For
End If
Next i
End Sub
or
Code:
Sub Demo()
Dim i As Long
For i = LBound(splitslash) To UBound(splitslash)
If splitslash(i) Like "*[/]*" Then
Range("H4").Value = splitslash(i)
Exit For
End If
Next i
End Sub
You'd ordinarily start at 0 because, by default, the first array element is 0. You'd only start at 1 if 'Option Base 1' has been set. The 'Exit For' is used because there's no point continuing the loop once the match has been found. The second version allows for cases where the module may or may not use 'Option Base 1'.