Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
not my code, but I would love to fix it. The rows.value(i+1,1) -- statements are wrong. How is it fixed please. 'fills in list box. stops at first empty row in project list Private Sub UserForm_Initialize() Dim orange As Range, orow As Range Set orange = ThisWorkbook.Names("Proj_range").RefersToRange 'load each into a list and sort ascending Dim i As Long ReDim list(orange.Rows.Count) For i = 0 To orange.Rows.Count If orange.Rows.Value(i + 1, 1) = "" Then Exit For list(i).text = Trim(orange.Rows.Value(i + 1) & " (" & orange.Rows.Value(i + 1) & ")") list(i).id = orange.Rows.Value(i + 1) Me.ListBox1.AddItem orow.Value(1) & " (" & orow.Value(1) & ")" Next ReDim Preserve list(i - 1) sort list For i = 0 To UBound(list) Me.ListBox1.AddItem list(i).text Next proj_id = 0 End Sub Stan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data validation list decreases as the user chooses from the list/s | Excel Discussion (Misc queries) | |||
List Box in User Form filled by Range | Excel Programming | |||
data validation list: how do i 'force' a user to enter data from the list? | Excel Discussion (Misc queries) | |||
data validation list: how do i 'force' a user to enter data from the list? | Excel Discussion (Misc queries) | |||
Condensing a list/range with blank cells to a new list/range without blanks | Excel Worksheet Functions |