Worksheets(
"Schmierprotokoll"
).Unprotect Password:=
"xxx"
SendKeys
"^{F1}"
Application.DisplayFullScreen =
False
Worksheets(
"Schmierprotokoll"
).Protect Password:=
"xxx"
AnzahlWB = Workbooks.Count
If
AnzahlWB <> 1
Then
Workbooks(
"Schmierprotokoll.xlsm"
).Close Savechanges:=
False
Else
Application.Quit
Application.DisplayAlerts =
False
End
If
If
TextBox1.Value =
""
And
TextBox2.Value =
""
Then
MsgBox (
"Bitte Name und Datum eintragen!"
)
ElseIf
TextBox1.Value =
""
And
TextBox2.Value <>
""
Then
MsgBox (
"Bitte Name eintragen!"
)
ElseIf
TextBox1.Value <>
""
And
TextBox2.Value =
""
Then
MsgBox (
"Bitte Datum eintragen!"
)
End
If
Application.DisplayAlerts =
False
End
If
End
Sub
Private
Sub
CommandButton2_Click()
Worksheets(
"Schmierprotokoll"
).TextBox2.Value =
Date
End
Sub