Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi all, following on from another question, is it possible to display
data that is filtered within a list box, i only want certain data to appear in this list the list is automatically filtered, but the whole list still appears in the list box. regards john |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub UserForm_Activate()
Dim rng As Range, rng1 As Range Dim cell As Range Dim i As Long ListBox1.Clear ListBox1.ColumnCount = 4 Set rng = Range("a2:a50") On Error Resume Next Set rng1 = rng.SpecialCells(xlVisible) On Error GoTo 0 If Not rng1 Is Nothing Then For Each cell In rng1 ListBox1.AddItem cell.Value i = ListBox1.ListCount - 1 ListBox1.List(i, 1) = cell.Offset(0, 1) ListBox1.List(i, 2) = cell.Offset(0, 2) ListBox1.List(i, 3) = cell.Offset(0, 3) Next End If End Sub -- Regards, Tom Ogilvy wrote in message oups.com... hi all, following on from another question, is it possible to display data that is filtered within a list box, i only want certain data to appear in this list the list is automatically filtered, but the whole list still appears in the list box. regards john |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listbox Question | Excel Discussion (Misc queries) | |||
Listbox Question | Excel Worksheet Functions | |||
Listbox Question | Excel Worksheet Functions | |||
ListBox Question | Excel Programming | |||
ListBox Question | Excel Programming |