Mega Code Archive

 
Categories / VisualBasic Script / Data Type
 

Instr function returns the position where one string begins within another string

Sub InstrExample()   Debug.Print InStr("A Balter", "Balter") 'Returns 8   Debug.Print InStr("Hello", "l") 'Returns 3   Debug.Print InStr("c:\my documents\my file.txt", "\") 'Returns 3 End Sub