Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I'm out of ideas, so I decided to post here... can someone please
tell me why this isn't working... I'm *trying* to populate a combo-box with a list of "Agency Names" from a spreadsheet... here's my code. Thanks in advance for all of your help!! -Allen Private Sub UserForm_Initialize() Dim a As Integer Dim cell As Range Dim Rng As Range a = 4 ' I am trying to find where the "Agency Name" list begins. Do While Worksheets(mEvent).Cells(a, 1).Value < "Agency Name" a = a + 1 Loop ' Once I find the list, I add one to the row value "a" so that "Agency Name is not included in the list. a = a + 1 ' This is the code that populates the combo-box. With Workbooks("Doctor & Agency Marketing DB.xls").Worksheets(mEvent) ' HERE IS WHERE I KEEP GETTING THE ERROR. Set Rng = .Range(Cells(a, 1), .Range(Cells(a, 1)).End(xlDown)) End With For Each cell In Rng.Cells Me.cbAgency.AddItem cell.Value Next cell btnOK.Enabled = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select range and put range address in variable | Excel Programming | |||
Macro to copy a specified range to a variable range | Excel Programming | |||
Range as variable No.2 | Excel Programming | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |