Naming a List Fill range for a drop down box
Posted by Jennifer on August 14, 2001 1:01 PM
I am currently developing an application in Excel using VBA. I have a dropdown box that I need help defining the list fill range.
Currently the only sytax that seems to work is .ListFillRange = "sheet1!$A$1:$A$62". Here is the problem...The range is variable. One time it may be 52 the next it may be 78.
How can I code the list fill range to accept a variable number. I have added a count to a cell in the same sheet. What I would like to do is call the value in that cell as the end cell for the drop down list.
Example: Say the values I want in the dropdown box is A1 thru A50, cell B5 has the value of the counter which is 50.
How can I code .ListFillRange = "sheet1!$A$1:$A$62" where 62 is the value of cell B5?