Cách tạo form đăng nhập trong VBA

Liên hệ QC

xukj

Thành viên mới
Tham gia
31/8/11
Bài viết
24
Được thích
0
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
 
Web KT
Back
Top Bottom