gibbo1715
01-25-2005, 09:01 AM
I have a dynamic range that is displayed in a list box.
Can I select an item in the list and when i click a button close the listbox and have the active row as per my selection?
I am using the code below re the list box
Dim Rng As Range
Me.ListBox1.Clear
With ThisWorkbook.Sheets("Actions")
Set Rng = .Range("A1", .Range("A65536").End(xlUp))
End With
For Each cell In Rng.Cells
With Me.ListBox1
.AddItem cell.Offset(0, 2).Value
.List(.ListCount - 1, 1) = cell.Value
'.List(.ListCount - 1, 1) = cell.Offset(0, 3).Value
End With
Next cell
Many thanks
Can I select an item in the list and when i click a button close the listbox and have the active row as per my selection?
I am using the code below re the list box
Dim Rng As Range
Me.ListBox1.Clear
With ThisWorkbook.Sheets("Actions")
Set Rng = .Range("A1", .Range("A65536").End(xlUp))
End With
For Each cell In Rng.Cells
With Me.ListBox1
.AddItem cell.Offset(0, 2).Value
.List(.ListCount - 1, 1) = cell.Value
'.List(.ListCount - 1, 1) = cell.Offset(0, 3).Value
End With
Next cell
Many thanks