Private
Sub
UserForm_Initialize()
Dim
n, i, x
As
Integer
Dim
e, r
As
Double
x = 0
r = Cells(Selection.Row, 5)
If
Cells(Selection.Row, 5) < Cells(Selection.Row, 4)
Then
For
e = Cells(Selection.Row, 4)
To
1
Step
1 / 96
ComboBox2.AddItem Format(e,
"hh:mm"
)
ComboBox1.AddItem Format(e,
"hh:mm"
)
x = x + 1
Next
For
e = 1 / 96
To
r
Step
1 / 96
ComboBox2.AddItem Format(e,
"hh:mm"
)
ComboBox1.AddItem Format(e,
"hh:mm"
)
x = x + 1
Next
Else
For
e = Cells(Selection.Row, 4)
To
r
Step
1 / 96
ComboBox2.AddItem Format(e,
"hh:mm"
)
ComboBox1.AddItem Format(e,
"hh:mm"
)
x = x + 1
MsgBox e
Next
End
If
x = x - 1
ComboBox3.AddItem
"Ja"
ComboBox3.AddItem
"Nein"
ComboBox1.SetFocus
ComboBox1.ListIndex = 0
ComboBox2.SetFocus
ComboBox2.ListIndex = x
ComboBox3.SetFocus
ComboBox3.ListIndex = 0
ComboBox1.Enabled =
False
ComboBox2.Enabled =
False
End
Sub