Private
Sub
UserForm_Initialize()
Dim
i
As
Single
For
i = 1
To
Worksheets.Count
With
ListBox1
.AddItem Worksheets(i).Name
End
With
Next
i
End
Sub
Private
Sub
CommandButton1_Click()
Dim
i
As
Single
Dim
j
As
Long
If
TextBox1.Value =
""
Or
TextBox2.Value =
""
Then
MsgBox (
"Sie müssen in eine Uhrzeit und ein Intervall eingeben"
)
Exit
Sub
End
If
For
i = 0
To
ListBox1.ListCount - 1
If
ListBox1.Selected(i)
Then
Worksheets(ListBox1.List(i)).Range(
"B23"
).Value = TextBox1.Text
End
If
Next
i
For
i = 0
To
ListBox1.ListCount - 1
If
ListBox1.Selected(i)
Then
j = 24
Do
Worksheets(ListBox1.List(i)).Cells(j, 2).Value = Cells(j - 1, 2).Value + TextBox2.Value / 24 / 3600
j = j + 1
Loop
Until
IsEmpty(Cells(j, 2).Value)
End
If
Next
i
Unload
Me
End
Sub