Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 424: Combobox trying to dynamically update listfillrange

Status
Not open for further replies.

jadadad

Technical User
Jun 2, 2004
12
US
I have Combobox named "Combobox1" on a worksheet named "Stat Input Menu". The text I need to fill "Combobox1" with is on another worksheet named "Const".

When I run the code (see below) from a command button in the worksheet "Const" (which is trying to set "listfillrange dynamically) it counts the lastrow fine, but at the line "ComboBox1.ListFillRange = "C3:C" & LastRow" is where the 424 "Object Required" error occurs.


Private Sub EnterRoster_Click()
Dim LastRow As Long
LastRow = Worksheets("Const").Cells(Rows.count, "C").End(xlUp).Row
Sheets("Stat Input Menu").Activate
ComboBox1.ListFillRange = "C3:C" & LastRow

Call enter_roster
End Sub

Any suggestions?
Thanks!
 




Hi,
Code:
Sheets("Stat Input Menu").ComboBox1.ListFillRange = "Const!C3:C" & LastRow
I personally prefer using Named Ranges. ALOT cleaner! faq68-1331


Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
Skip,

U R da Man!! Thanks. Your code worked great. [2thumbsup]

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top