Xu ly chuoi ho ten

Private Sub Command1_Click()

Dim a, b As String

Dim M, n As Long

b = Trim(t1)

Do While InStr(1, b, "  ") <> 0

b = Replace(b, "  ", " ")

Loop

a = StrConv(b, vbProperCase)

M = Len(a)

If t1.Text <> "" Then

Do While Mid(a, M, 1) <> " "

M = M - 1

Loop

t1 = a

t2 = Mid(a, 1, M - 1)

t3 = Mid(a, M + 1)

End If

End Sub

Private Sub Command2_Click()

t1.Text = ""

t2.Text = ""

t3.Text = ""

t1.SetFocus

End Sub

Private Sub Command3_Click()

If MsgBox("Baïn muoán thoaùt khoâng", vbYesNo + 32 + vbDefaultButton1, "Thoâng Baùo") = vbYes Then

End

End If

End Sub

Bạn đang đọc truyện trên: AzTruyen.Top

Tags: