Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InStr function with speech marks

Status
Not open for further replies.

Grunty

Technical User
Jul 30, 2002
100
GB
can anyone help me with the syntax of the InStr function?

I want to search a text file for a line beginning REG LOAD HKU\NTUSER "\\Servername including the speech mark before the \\Servername.

so intLineFindera = InStr(strNextLinea, "REG LOAD HKU\NTUSER "\\Servername") doesnt work. I have tried combinations of multiple speech marks but haven't found a solution yet.

Thanks
 
InStr(strNextLinea, "REG LOAD HKU\NTUSER " & Chr(34) & "\\Servername" & Chr(34))
 
you can also conider "" or """ to cap it off if you dont like the Chr(34)'s

something like

InStr(strNextLinea, "REG LOAD HKU\NTUSER ""\\Servername""")

... i think
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top