Combobox- Einlesen ohne Duplicate
09.07.2003 19:57:42
Wolfgang
was nicht funktioniert: es werden nur texte in die combobox geladen - zahlen werden ignoriert
wie könnte man es umschreiben, so daß es sowohl für text als auch für werte funktioniert?
oder liegt es an den einstellungen der eigenschaften der combobox?
Private Sub UserForm_Initialize()
Dim col As New Collection
Dim intRow As Integer
intRow = 1
On Error Resume Next
' Do Until IsEmpty(Cells(intRow, Selection.Column))
Do Until IsEmpty(Cells(intRow, 1))
' col.Add Cells(intRow, Selection.Column), Cells(intRow, Selection.Column)
col.Add Cells(intRow, 1), Cells(intRow, 1)
intRow = intRow + 1
Loop
For intRow = 1 To col.Count
cboDuplikate.AddItem col(intRow)
Next intRow
cboDuplikate.ListIndex = 0
End Sub