Then you use
VB Code:
CType("myString", String)
You could also use DirectCast ;p
Edit: here is the full statement just in case
VB Code:
'you can use either of these Msgbox InStr(startIndex, strbuffer, Ctype("MyString", String)) 'DirectCast Is quicker but it MUST BE A STRING as it does not do type checking Msgbox InStr(startIndex, strbuffer, DirectCast("MyString", String))





Reply With Quote