Tach ho ten lot

Private Sub Command1_Click()

Dim ho, ten, dem, ht As String

Dim m, n As Byte

ht = Trim(Text1)

n = InStr(1, ht, " ")

ho = Left(ht, n - 1)

m = Len(ht)

Do While Mid(ht, m, 1) <> " "

m = m - 1

Loop

ten = Mid(ht, m + 1)

dem = Mid(ht, n + 1, m - n - 1)

lblho = "ho: " & ho

lblten = "ten: " & ten

lbldem = "dem:" & dem

End Sub

Private Sub Command2_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

Private Sub xoa_Click()

Text1.Text = " "

lblten = " "

lblho = " "

lbldem = " "

End Sub

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

Tags: