View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default reference sheets

MaxRott

It's because the Address property of a range does not identify which sheet
it's on. These two line produce the exact same result

Sheets("Sheet1").Range("A1").Address
Sheets("Sheet2").Range("A1").Address

If you know the sheet and the range, then just assign a string to the
ListFillRange

ListBox1.ListFillRange = "Sheet1!A4:A14"

If you want to use address, then you it would look like this

ListBox1.ListFillRange = Worksheets("Sheet1").Name & "!" &
Worksheets("Sheet1").Range("A4:A14").Address

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"MaxRott" wrote in message
...
Forgot to mention.....when I use data on the same sheet I can use:

Private Sub ListBox1_Click()

ListBox1.ListFillRange = ActiveSheet.Range("A4:A14").Address

End Sub

and it works fine.


---
Message posted from http://www.ExcelForum.com/