VB6 Find and replace text in textbox

Hey guys,

I am using VB6 to write a small utility and I have to find a way to do one of 2 things.

#1  Find and replace percent signs (%) with double percent signs (%%) in VB6


text1.text = test%test%test  AFTER FIND AND REPLACE WITH text1.text = test%%test%%test


#2 Have percent signs in a BAT file be have them treated as a string. I cant figured out how to denote the password, that contains a percent sign, as a string.

Any ideas?
Who is Participating?
Martin LissConnect With a Mentor Older than dirtCommented:
Text1.Text = Replace(Text1.Text, "%", "%%")
triphenAuthor Commented:
It worked. Thank you!!!!!
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

Select the 'About Me' tab in my profile and you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2013
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.