Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
Can someone please help me with a problem that I've with Userforms and Listboxes? The problem is that I've a multicolumn listbox loaded in a userform (multipage control) and depending on option buttons (or other controls) I would like to select some rows so I can manipulate them in the next tab of the multipage control. My code for a command button that selects all the rows is the following: Private Sub cbAll_Click() Dim i As Integer For i = 0 To lbSales.ListCount - 1 lbSales.Selected(i) = True Next i End Sub However I would like to select all the rows that have a particular value (ie "1000" in column 4) in one of the columns of the listbox. Can anyone help me? Many thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub cbAll_Click()
Dim i As Integer For i = 0 To lbSales.ListCount - 1 if isnumeric(lbSales.List(i,3)) then if cdbl(lbSales.List(i,3)) 1000 then lbSales.Selected(i) = True end if end if Next i End Sub or do you mean it literally has the string "1000" -- Regards, Tom Ogilvy "wpllc2004" wrote in message m... Hello Can someone please help me with a problem that I've with Userforms and Listboxes? The problem is that I've a multicolumn listbox loaded in a userform (multipage control) and depending on option buttons (or other controls) I would like to select some rows so I can manipulate them in the next tab of the multipage control. My code for a command button that selects all the rows is the following: Private Sub cbAll_Click() Dim i As Integer For i = 0 To lbSales.ListCount - 1 lbSales.Selected(i) = True Next i End Sub However I would like to select all the rows that have a particular value (ie "1000" in column 4) in one of the columns of the listbox. Can anyone help me? Many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding Header to multicolumn ListBox | Excel Programming | |||
populating multicolumn listbox with an array instead of... | Excel Programming | |||
Populating multicolumn listbox the wrong way | Excel Programming | |||
multicolumn Listbox and textalignment | Excel Programming | |||
Values in a MultiColumn Listbox | Excel Programming |