mungkin begini ( module userform1 )
Dim OkUser As Boolean
Private Sub CommandButton1_Click()
If txt_user.Value <> Sheet1.Range("B1") Then
OkUser = False
MsgBox "User Name Anda Salah"
txt_user = ""
Exit Sub
ElseIf txt_pass.Value <> Sheet1.Range("B2") Then
OkUser = False
MsgBox "Password Anda Salah"
txt_pass = ""
ActiveWorkbook.Close
Else
OkUser = True
txt_user = ""
txt_pass = ""
MsgBox "Selamat Bekerja"
Sheet1.Select
Range("B10").Select
Unload Me
End If
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If Not OkUser Then ThisWorkbook.Close
End Sub
2011/11/16 Aziz Yudhistira Alaudin <aziz.yudhistira.alaudin@gmail.com>
Wahai para pakar XL, aku coba bikin form login, sudah berhasil...
Tetapi kenapa yah masih bisa ditembus dengan meng-klik tanda cross di form ?...
Klo ga diperbaiki, bisa ditembus oleh user ilegal dong...
Mohon pencerahannya dong kode syntax-nya.....
Terima kasih sebelumnya
__._,_.___
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| ayooo... coba cari XL-mania di linkedin.com |
| selamat merayakan idul adha! |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message, melecehkan, tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/ |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau... |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html |
+-------------------------------------------------------------------+
| Message lama ada di : |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id] |
| http://www.mail-archive.com/xl-mania@yahoogroups.com |
+-------------------------------------------------------------------+
| ayooo... coba cari XL-mania di linkedin.com |
| selamat merayakan idul adha! |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message, melecehkan, tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/ |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau... |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html |
+-------------------------------------------------------------------+
| Message lama ada di : |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id] |
| http://www.mail-archive.com/xl-mania@yahoogroups.com |
+-------------------------------------------------------------------+
MARKETPLACE
.
__,_._,___
Nenhum comentário:
Postar um comentário