| siehe auch Passwort mit Array | http://www.wbrnet.info/db/0066.html |
| |
| |
| Public jjjj As Integer | Public-Deklarationen für zwei Formulare |
| Public mm As Integer | |
| Public tt As Integer | |
| Public maxtag%(12) | |
| Public dfehl% | |
| Public passwort As String | |
| |
| Private Sub Form_Load() | Formular 1: AnmeldeFormular mit Passworteingabe |
| frmAnmeld.Show | |
| txtName.SetFocus | |
| txtPw.PasswordChar = "*" | |
| End Sub | |
| |
| Private Sub cmdOK_Click() | |
| passwort = "mytest" | |
| If txtName = "" Then | Die TextBox txtName muss einen Namen enthalten |
| MsgBox "Geben Sie Ihren Namen ein!", 64 + 0, "Eingabefehler" |
| txtName.SetFocus | |
| Else | |
| If txtPw.Text <> passwort Then | |
| Select Case MsgBox("Bitte geben Sie das richtige Passwort ein!", 5 + 16, "Fehlerhafte Eingabe") |
| Case 4: txtPw.Text = "" | |
| txtPw.SetFocus | |
| Case 2: Unload Me | |
| End Select | |
| Else | |
| MsgBox "Hallo " & txtName.Text & ", du hast das" & vbCrLf & "Passwort " & passwort & " korrekt eingegeben." |
| Unload frmAnmeld | |
| frmDatPruef.Visible = True | Nur wenn das Passwort richtig, wird ein 2. Formular |
| End If | geladen. |
| End If | |
| End Sub | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Private Sub cmdEnde_Click() | |
| Unload Me | |
| End Sub | |
| |