This will do it:
===== START OF CODE
Private Sub Form_Load()
rem create a command button named command1
rem create a text box named text1
rem run this source, enter some text and then press the button
Text1.Text = ""
Command1.Caption = "Convert"
End Sub
Private Sub Command1_Click()
rem this routine analyzes the text1.text and converts every
rem space into "+"
temp = Text1.Text
For chk = 1 To Len(Text1.Text)
If Mid$(Text1.Text, chk, 1) = " " Then Mid$(temp, chk, 1) = "+"
Next chk
Text1.Text = temp
End Sub
===== END OF CODE
mad-cowz heeft geschreven in bericht
Quote:
>Can I have the user input a Sting in a text box like "How are You?"
>and then have the program change it to "How+are+you?"
>In other words just change the spaces to plus signs.
> Thanks,
> Andy Phelan