ok I ahve this code that gets last chat line wich is 'LastTextR' and code that gets last name LastSNR these are no probs but i dont understand this loop

Private Sub Command1_Click()
If LastTextR = Text1 Then
Loop Until LastTextR = Text1.Text
sendchatroom "Ty for helping me " + LastSNR
End If
End Sub

i'm trying to keep looping the LastTextR until it find a certain text like /test and when it sees /test it sends sendchatroom "hi"

the problem is when i hit the button it only checks the LastTextR one time...so i need to loop the LastTextR some how...i haven't got it figured out yet..anyone understand what i'm saying?