Datumsformat
Nico
Ich habe folgendes Problem:
Im folgendem Code wird mir das datum was dem Urlaub zugeortnet ist( U) einzeln aufgelistet Private Sub ComboBox1_Click() Dim r As Integer Dim c As Integer Dim Datum As Date ListBox1.Clear ListBox2.Clear ListBox3.Clear ListBox4.Clear For c = 6 To 66 If ComboBox1.Value = Cells(11, c).Value Then Exit For Next c For r = 12 To 377 Datum = DateValue(Cells(r, 2).Value) If Cells(r, c).Value = "U" Then ListBox1.AddItem Datum & " 1" If Cells(r, c).Value = "F" Then ListBox2.AddItem Datum & " 1" If Cells(r, c).Value = "W" Then ListBox3.AddItem Datum & " 1" If Cells(r, c).Value = "K" Then ListBox4.AddItem Datum & " 1" If Cells(r, c).Value = "U½" Then ListBox1.AddItem Datum & " ½" If Cells(r, c).Value = "F½" Then ListBox2.AddItem Datum & " ½" If Cells(r, c).Value = "W½" Then ListBox3.AddItem Datum & " ½" If Cells(r, c).Value = "K½" Then ListBox4.AddItem Datum & " ½" Next r TextBox1.Locked = False TextBox2.Locked = False TextBox3.Locked = False TextBox4.Locked = False TextBox1.Value = "Resturl. = " & Cells(6, c).Value TextBox2.Value = Cells(7, c).Value TextBox3.Value = Cells(8, c).Value TextBox4.Value = Cells(9, c).Value TextBox5.Value = "Anspruch = " & Cells(4, c).Value TextBox1.Locked = True TextBox2.Locked = True TextBox3.Locked = True TextBox4.Locked = True CommandButton1.SetFocus End Sub
Ist es möglich den Code so umzuschreiben das er mir das Datum folgendermaßen anzeigt z.B. "02.01.2012 bis 07.01.2012"
Bin am verzweifeln
LG Nico