Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to fill it with the first row values of the active sheet . I came up
with this but isn't there a way to set the row source value? Also, this is a listbox in a dialog that I want to load when the dialog loads, is there a onload event or something that I can use to trigger this? Thanks Public Sub Load() Dim Rng As Range Const rw As Long = 1 With Sheets(ActiveSheet.Name) If IsEmpty(ActiveSheet.Cells(rw, 1)) Then Set Rng = .Cells(rw, 1) Else Set Rng = .Cells(rw, Columns.Count).End(xlToLeft)(1, 2) End If End With Dim i As Integer For i = 1 To Rng.Column - 1 ListBox_Describe.AddItem Cells(1, i) Next i End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fill a listbox with data from variable range | Excel Programming | |||
R1C1 seems to effect listbox fill in VBA | Excel Programming | |||
Fill a ListBox with items using VBA | Excel Programming | |||
For..next.. help to fill listbox | Excel Programming | |||
Fill a Listbox with Values from a Pivot Table Field - an Example | Excel Programming |