I can't figure out listfillrange

G

Guest

I'm trying to create a listbox named ClientStatus from Control Toolbox
toolbar on worksheet 'Cover Info'. My list data is in column A of worksheet
'Data Formatting'. It won't let me enter anything in the ListFillRange under
Properties, and I can not for the life of me figure out how to use the
ListFillRange in VBA. (I'm new to all of this. Just learning by reading
other's answers.)
 
G

Guest

hi,
is the listfillrange on the same sheet as your listbox. if
it is on another sheet, it will "disapear" on you or
reference the range on the same sheet with the list box.
 
G

Guest

yes, it is on another sheet, and it does "disappear" on me. How do I get it
to pull from another sheet?
 
D

Dave Peterson

I could manually type in the range that I wanted:

'Data Formatting'!A1:A13

(note the single quotes and exclamation mark)

In code:

With Worksheets("Cover Info").ListBox1
.ListFillRange = Worksheets("data formatting").Range("a1:a13") _
.Address(external:=True)
End With
 
G

Guest

Thanks so much, Dave! It's embarrassing that it was that simple, but when
you can't get it to work it seems so hard!
 
G

Guest

So how do you format that using UNC ("\\server\path\filename) to reference a
remote file (stored on a different drive) as the source? I keep getting a
"Subscript out of range" error...
 

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