ListBox RowSource set to range of in-active sheet - possible?

W

What-A-Tool

I am trying to set a listbox RowSource to a range of cells on another,
in-active sheet. Is this possible?

Using this give me the range of the active sheet :
lstAddress.RowSource = "A4:E4"
What needs to be added to make this reference another sheet?

Thanks - Sean
 
D

Dave Peterson

I like to do it this way:

dim myRng as range
....
set myrng = worksheets("sheet9999").range("a4:e4")
....
lstAddress.rowsource = myrng.address(external:=true)

Try
msgbox myrng.address(external:=true)
and you'll see what that does.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top