Private
Sub
CommandButton_Click()
Dim
S
As
String
Dim
KOMMEN
As
String
Dim
GEHEN
As
String
Dim
MONAT
As
String
Dim
PAUSE1A
As
String
Dim
PAUSE1E
As
String
Dim
PAUSE2A
As
String
Dim
PAUSE2E
As
String
Dim
bereich
As
Range
Dim
ZELLE
As
Range
S = Zeiterfassung.TextBox3.Value
S = Format(S,
"dd/mm/yyyy"
)
KOMMEN = Zeiterfassung.TextBox10.Value
GEHEN = Zeiterfassung.TextBox5.Value
PAUSE1A = Format(PAUSE1A,
"hh:mm"
)
PAUSE1E = Format(PAUSE1E,
"hh:mm"
)
PAUSE2A = Format(PAUSE2A,
"hh:mm"
)
PAUSE2E = Format(PAUSE2E,
"hh:mm"
)
PAUSE1 = Format(PAUSE1,
"hh:mm"
)
PAUSE2 = Format(PAUSE2,
"hh:mm"
)
KOMMEN = Format(KOMMEN,
"hh:mm"
)
GEHEN = Format(GEHEN,
"hh:mm"
)
MONAT = Zeiterfassung.ComboBox1.Value
PAUSE1A = Zeiterfassung.TextBox11.Value
PAUSE1E = Zeiterfassung.TextBox12.Value
PAUSE2A = Zeiterfassung.TextBox7.Value
PAUSE2E = Zeiterfassung.TextBox6.Value
Set
bereich = Sheets(MONAT).Range(
"A1:A100"
)
Set
ZELLE = bereich.Find(what:=S, lookat:=xlWhole, LookIn:=xlFormulas)
If
ZELLE
Is
Nothing
Then
MsgBox
"Bitte Datum korrekt eingeben"
Else
Application.Goto ZELLE
ZELLE.Offset(0, 1).Value = TextBox10.Text
ZELLE.Offset(0, 2).Value = TextBox5.Text
ZELLE.Offset(0, 4).Value = TextBox11.Text
ZELLE.Offset(0, 5).Value = TextBox12.Text
ZELLE.Offset(0, 6).Value = TextBox7.Text
ZELLE.Offset(0, 7).Value = TextBox6.Text
End
If
Unload Zeiterfassung
End
Sub