Ich habe folgenden Code:
Private Sub ComboBox1_Change()
Dim iSpalte As Integer
Dim iZiel As Integer
Dim rng As String
iSpalte = ComboBox1.ListIndex + 11
rng = Chr(iSpalte + 64) & "65536"
iZiel = Worksheets("Teilnahme").Range(rng).End(xlUp).Row
ComboBox2.Clear
ComboBox2.List = Format(Range(Worksheets("Teilnahme").Cells(2, iSpalte), _
Worksheets("Teilnahme").Cells(iZiel, iSpalte)), "hh:mm")
End Sub
Öffne ich die Dropdownliste der Combobox2 wird mir die Uhrzeit als Dezimalzahl angezeigt. Mit diesem Code habe ich die Uhrzeit in der Combobox2 richtig angezeigt bekommen:
Private Sub ComboBox2_Change()
ComboBox2 = Format(ComboBox2, "hh:mm")
End Sub
Aber wie wird mir die richtige Uhrzeit in der Dropdownliste der Combobox2 angezeigt?Kann mir da jemand helfen?