can someone give me the code for a find and replace functionality in a string.......
it wud b really helpful...
thanx a zillion
Printable View
can someone give me the code for a find and replace functionality in a string.......
it wud b really helpful...
thanx a zillion
just use the replace function :
Code:Private Sub Form_Load()
Dim strTemp As String
strTemp = "the cat sat on the mat"
MsgBox Replace(strTemp, "the", "a")
End Sub
VB Code:
Private Sub Command1_Click() Dim s As String s = "teep dimdidumdiada lakdsjfpc teep and this is a testeep" s = Replace(s, "teep", "peet") MsgBox s End Sub
You're starting to sound like crptblade now. :)Quote:
Originally posted by peet
"teep dimdidumdiada lakdsjfpc teep and this is a testeep"
hehehe... I take that as a compliment :)
hes my Turbo Gimp hero :eek: :D