beim oeffnen meine Datei habe ich eine UserForm, auf denen 2 Buttons (Sales und Purchasing) sind, von denen ich jeweils ein Button waehlen kann. Demenstprechend komme ich in die Datei.
Ich habe, z.B. fuer Purchasing folgenden Code:
Private Sub CommandButton2_Click() 'starts the Process and functions of the _
Purchasing Button
ThisWorkbook.Worksheets("Agreement").Activate
Sheets("Agreement").Visible = True
Unload UserForm1
End Sub
Fuer Purchasing moechte ich jedoch passwortgeschuetzt haben.
Somit habe ich das versucht:
Private Sub CommandButton2_Click() 'starts the Process and functions of the _
Purchasing Button
START:
If InputBox("Please enter your Password") = "333" Then
Unload UserForm1
Sheets("Agreement").Activate
Else
If MsgBox("The Password is not correct. Would you like to try again?", vbYesNo) = vbNo Then _
Exit Sub
GoTo START
End If
End Sub
Jetzt funktioniert jedoch gar nichts mehr ;-)
d.h. trotz druecken der Buttons komme ich nicht mehr in das jeweilige Sheet rein!!
HILFE ;-)
vllt kann mir jemand meinen Fehler sagen!?
Vielen Dank
Gruesse
Timmy