HERBERS
Excel-Forum
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
listbox
05.06.2008 20:29:00
ralf
hallo forum
gibt es eine möglichkeit in einer listbox die spaltenfarbe unterschiedlich
zu machen . fülle die listbox über diesen code

Private Sub ListBoxFüllen()
Dim lngRow As Long, lngLast As Long
ListBox1.Clear
ListBox1.ColumnCount = 3
ListBox1.ColumnWidths = "65;150;30"
ListBox1.TextAlign = fmTextAlignLeft
With ActiveSheet
lngLast = Application.Max(2, .Cells(Rows.Count, 24).End(xlUp).Row)  '
For lngRow = 2 To lngLast
ListBox1.AddItem .Cells(lngRow, 24)
ListBox1.List(ListBox1.ListCount - 1, 1) = .Cells(lngRow, 25)
ListBox1.List(ListBox1.ListCount - 1, 2) = Format(CDbl(.Cells(lngRow, 26).Value), "#,##0.00\  _
€")
Next
End With
End Sub


gruss
ralf

1
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Benutzer
Nein, nur eine Farbe für alles. oT
05.06.2008 20:41:00
Knut
oT

Links zu Excel-Dialogen

Meistgelesene Forumthreads (12 Monate)