Hi,
I am trying to replace multiple words from the text box.
for example:
I want few words should be in Upper case only. Like "cat" to be replaced with "CAT", "dog" always appears as "DOG", "bat" to be replaced with "BAT" and "Hub" always appears as "HUB",
I put following code for the command button click event:
[code]
Private Sub cmdreplace_Clic k()
Dim txt
txt = Text1.Text
text1.text = Replace(txt, " cat ", " CAT ").Replace( txt, " dog ", " DOG ").Replace( txt, " rat ", " RAT ").Replace( txt, " hub ", " HUB ")
End Sub
[code]
This is not working. Any idea ...
I am trying to replace multiple words from the text box.
for example:
I want few words should be in Upper case only. Like "cat" to be replaced with "CAT", "dog" always appears as "DOG", "bat" to be replaced with "BAT" and "Hub" always appears as "HUB",
I put following code for the command button click event:
[code]
Private Sub cmdreplace_Clic k()
Dim txt
txt = Text1.Text
text1.text = Replace(txt, " cat ", " CAT ").Replace( txt, " dog ", " DOG ").Replace( txt, " rat ", " RAT ").Replace( txt, " hub ", " HUB ")
End Sub
[code]
This is not working. Any idea ...
Comment