rivate Sub Command1_Click()
Dim x As Integer, ng As Integer, b As Integer, counter As Integer
Dim z As String, y As String, char1 As String, str1 As String
z = 0

For x = 1 To Len(Text1.Text)
y = Mid(Text1.Text, x, 1)
If (y) = "ng" Then
z = z + 1
Label.Caption = z
End If
Next
counter = 0
str1 = Text1.Text
For b = i To Len(str1)
char1 = char1 + Replace(str1, char1, "", i)
Form1.Caption = Form1.Caption + char1
Next
End Sub
-----------
this code should display a counter for every occurence of the "ng" but i do not know if what part of this code does not work... help pls... thanx