I can't figure out why this line is throwing the "Error 1004: Application Defined or Object Defined error"? Can someone help?
The object "CombQTY" is a combo box in a userform "MASTER". I am trying to populate the drop down menu of this combo box with the range "QTY_range" (size is 31 rows of numbers in a column = 0,1,2,3,..30).
I have tried swapping the "Userform" with "MASTER" and vice versa.
Private Sub Userform_Initialize()
MASTER.CombQTY.List = Worksheets("RANGES").Range("QTY_range").Value
End Sub
I can't understand why its throwing that error because I don't see any problem with this code. Please help
Not directly answering your question, but relative to what you're doing (we don't see what
QTE_range
address is).I tend to loop and collect a list, so i don't have to worry about the dimensions of my named range (more columns than rows).. .example code (untested):
Note the references... userform is
Me
and workbook isthisworkbook
, which could be antoher ref, or to a sheet name, etc.