ich möchte in eine UF-ComboBox nur die Jahres- Zahl ohne doppelte einlesen.
Meine Liste z.B
01.02.2015
03.06.2015
02.07.2016
06.08.2017
usw.
mein Versuch
Private Sub CommandButton1_Click()
Dim loEnde As Long
Dim col As New Collection
Dim iRow As Integer
Range("A2:A5").Select
Selection.Copy
Range("K2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.NumberFormat = "yyyy"
iRow = 2
On Error Resume Next
Do Until IsEmpty(Cells(iRow, 11))
col.Add Cells(iRow, 11), Cells(iRow, 11)
If Err = 0 Then
cboJahr.AddItem Cells(iRow, 11)
Else
Err.Clear
End If
iRow = iRow + 1
Loop
On Error GoTo 0
cboJahr.ListIndex = -1
End Sub
Funktioniert nicht
Danke für Eure Hilfe!
Gruß
Ludmila