có pro ai hướng dẫn mình hok nhỉ? Đăng nhập xong là nó bay vào giao diện trong VBA lun chớ???
Private Sub cmddangnhap_Click()
Dim ten, mk As String
ten = "xukj"
mk = "12345"
With Me
If ((.txtten.Value = ten) And (.txtmk.Value = mk)) Then
Unload Me
Else
.txtten.Value = ""
.txtmk.Value = ""
.txtten.SetFocus
End If
End With
End Sub
Private Sub cmdthoat_Click()
Application.Quit
End Sub
Private Sub UserForm_Initialize()
Application.Worksheets("kien").Select
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then Cancel = True
End Sub
Private Sub cmddangnhap_Click()
Dim ten, mk As String
ten = "xukj"
mk = "12345"
With Me
If ((.txtten.Value = ten) And (.txtmk.Value = mk)) Then
Unload Me
Else
.txtten.Value = ""
.txtmk.Value = ""
.txtten.SetFocus
End If
End With
End Sub
Private Sub cmdthoat_Click()
Application.Quit
End Sub
Private Sub UserForm_Initialize()
Application.Worksheets("kien").Select
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then Cancel = True
End Sub