Private
Sub
ComboBox1_Change()
End
Sub
Private
Sub
ListBox1_Click()
End
Sub
Private
Sub
Label4_Click()
End
Sub
Private
Sub
TextBox3_Change()
End
Sub
Private
Sub
TextBox6_Change()
End
Sub
Private
Sub
UserForm_Initialize()
Me
.TextBox6.SetFocus
With
Me
.ComboBox3
.AddItem
"JM"
.AddItem
"MK"
.AddItem
"BH"
.ListIndex = 0
End
With
With
Me
.ComboBox1
.AddItem
"EIKS_AB"
.AddItem
"PV_JIRA_WF"
.AddItem
"PMO"
.AddItem
"Projektmanagement"
.AddItem
"PMO_WIKI"
.AddItem
"Sonstiges"
.ListIndex = 3
End
With
With
Me
.ComboBox2
.AddItem
"0,5"
.AddItem
"1,0"
.AddItem
"1,5"
.AddItem
"2,0"
.AddItem
"2,5"
.AddItem
"3,0"
.AddItem
"3,5"
.AddItem
"4,0"
.AddItem
"4,5"
.AddItem
"5,0"
.AddItem
"5,5"
.AddItem
"6,0"
.AddItem
"6,5"
.AddItem
"7,0"
.AddItem
"7,5"
.AddItem
"8,0"
.AddItem
"8,5"
.ListIndex = 4
End
With
End
Sub
Private
Sub
CommandButton1_Click()
Dim
i
As
Integer
Sheets(
"Display"
).Activate
Range(
"A2"
).
Select
i = 1
If
Me
.TextBox3.Text = Empty
Then
MsgBox
"Bitte Datum eingeben."
, vbExclamation
Me
.TextBox3.SetFocus
Exit
Sub
End
If
If
Len(TextBox3.Text) < 5
Then
MsgBox
"Bitte überprüfe die Datums Eingabe."
, vbExclamation
Me
.TextBox3.SetFocus
Exit
Sub
End
If
If
Len(TextBox3.Text) > 5
Then
MsgBox
"Bitte überprüfe die Datums Eingabe."
, vbExclamation
Me
.TextBox3.SetFocus
Exit
Sub
End
If
If
Me
.ComboBox1.Text = Empty
Then
MsgBox
"Bitte Projekt auswählen."
, vbExclamation
Me
.ComboBox1.SetFocus
Exit
Sub
End
If
If
Me
.ComboBox2.Value = Empty
Then
MsgBox
"Bitte Stunden auswählen."
, vbExclamation
Me
.ComboBox2.SetFocus
Exit
Sub
End
If
If
Me
.ComboBox3.Text = Empty
Then
MsgBox
"Bitte Mitarbeiter Kürzel auswählen."
, vbExclamation
Me
.ComboBox3.SetFocus
Exit
Sub
End
If
Dim
strPass
As
String
strPass =
"student"
If
Me
.TextBox6.Text = Empty
Then
MsgBox
"Bitte Passwort eingeben."
, vbExclamation
Me
.TextBox6.SetFocus
Exit
Sub
End
If
If
Me
.TextBox6.Text = strPass
Then
MsgBox
"Ihre Eingabe wurde gespeichert. Änderungen können nur als Administrator vorgenommen werden."
, vbExclamation
UnProtected =
True
Else
If
MsgBox(
"Das Passwort ist falsch. Bitte geben Sie das richtige Passwort ein."
, vbYesNo) = vbNo
Then
Unload
Me
Else
Exit
Sub
End
If
End
If
Do
Until
ActiveCell.Value = Empty
ActiveCell.Offset(1, 0).
Select
i = i + 1
Loop
ActiveCell.Value =
Me
.TextBox3.Text
ActiveCell.Offset(0, 1).Value =
Me
.ComboBox1.Text
ActiveCell.Offset(0, 2).Value =
Me
.ComboBox2.Value
ActiveCell.Offset(0, 3).Value =
Me
.ComboBox3.Text
ActiveCell.Offset(0, 4).Value =
Me
.TextBox5.Text
ActiveWorkbook.Worksheets(
"Display"
).ListObjects(
"Tabelle1"
).Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets(
"Display"
).ListObjects(
"Tabelle1"
).Sort.SortFields. _
Add Key:=Range(
"Tabelle1[[#All],[Datum]]"
), SortOn:=xlSortOnValues, Order _
:=xlDescending, DataOption:=xlSortNormal
With
ActiveWorkbook.Worksheets(
"Display"
).ListObjects(
"Tabelle1"
).Sort
.Header = xlYes
.MatchCase =
False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End
With
ActiveWorkbook.Save
Me
.ComboBox1.Text = Empty
Me
.TextBox3.Text = Empty
Me
.TextBox5.Text = Empty
Me
.TextBox3.SetFocus
End
Sub
Private
Sub
Worksheet_SelectionChange(
ByVal
Target
As
Range)
If
Not
UnProtected
Then
Mitarbeiter1.Show
End
Sub
Private
Sub
CommandButton2_Click()
Unload
Me
End
Sub