Xu ly chuoi van ban
Private Sub Command1_Click()
Dim s, tu As String
Dim n, dem As Integer
s = txtnguon
tu = txtdtu
n = InStr(1, s, tu)
dem = 0
Do While n > 0
dem = dem + 1
s = Mid(s, n + Len(tu))
n = InStr(1, s, tu)
Loop
lbldem = "keát quaû:" & Str(dem)
End Sub
Private Sub Command2_Click()
txtnguon = " "
txtdtu = " "
lbldem = " "
End Sub
Private Sub Command3_Click()
Dim tl As String
tl = MsgBox("ban co muon thoat khong", vbQuestion + vbYesNoCancel, "bang thong bao")
If tl = vbYes Then
End
End If
End Sub
Bạn đang đọc truyện trên: AzTruyen.Top