|
-
Aug 31st, 2010, 08:56 PM
#1
Thread Starter
Junior Member
[RESOLVED] newbie here... need help on built-in functions...
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|