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
result
As
Double
Dim
suchbereich
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
suchbereich = Range(
"A1:A100"
)
Sheets(MONAT).
Select
result = WorksheetFunction.Match(
CDbl
(S), suchbereich, 0)
If
IsNumeric(result)
Then
Application.Goto result
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
Else
Msgbox(
"Nicht gefunden"
)
End
If
Unload Zeiterfassung
End
Sub