bataggone
XLDnaute Occasionnel
bonjour tt le monde
manque une astuce pour compléter macro
plus de détailles sur l'image
merci
code
Private Sub CommandButton1_Click()
Dim username, password As String
username = TextBox1.Text
password = TextBox2.Text
If username = "myuser" And password = "mypassword" Then
MsgBox "You entred the correct ino", vbInformation
Unload Me 'unload this form
Else
MsgBox "you entred the WRONG info", vbCritical Or vbYesNoCancel
'now close the workbook
ThisWorkbook.Close
End If
End Sub
manque une astuce pour compléter macro
plus de détailles sur l'image
merci
code
Private Sub CommandButton1_Click()
Dim username, password As String
username = TextBox1.Text
password = TextBox2.Text
If username = "myuser" And password = "mypassword" Then
MsgBox "You entred the correct ino", vbInformation
Unload Me 'unload this form
Else
MsgBox "you entred the WRONG info", vbCritical Or vbYesNoCancel
'now close the workbook
ThisWorkbook.Close
End If
End Sub