View Single Post
Old Jun 7th, 2005, 2:16 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
First of all, specify a type when defining a variable: Dim str As String, etc. Next, you don't always need to declare a variable - you could just as easily write it like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
	Dim lbloc As Int16
	Dim rbloc As Int16
	
	lbloc = InStr(rtb1.Text, "<")
	rbloc = InStr(rtb1.Text, ">")
	rtb2.Text = rtb2.Text + " " + Mid(rtb1.Text, lbloc, rbloc)
	rtb1.Text = Mid(rtb1.Text, rbloc + 1, rtb1.Text.Length)
End Sub
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote