• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to set List fill range for ActiveX control Listbox via VBA code.

raf

New Member
Hi all,

Im looking for a code that would dictate the range of my ActiveXlistbox after refreshing the file. Can someone help? adding range via ActiveXcontrol is not an option as it sometimes change the range after the refresh activity.

Something like:

Code:
sub refresh ()
ActiveWorkbook.RefreshAll
Listbox = RAW!AA11:AJ100
 
Not sure if I understood. Do you want the listbox to populate from dynamic range or fixed range?

Something like this for fixed range.
Code:
ActiveSheet.ListBox1.List = ActiveSheet.Range("AA11:AJ100").Value

Sample sheet with what it looks like before refresh and what it could look like after refresh would help (also what it should look like after refresh).
 
I think u are looking for rowsource property of the listbox.

For better ! Upload the sample with what Chihiro already asked.
 
Back
Top