View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
peter_rivera[_7_] peter_rivera[_7_] is offline
external usenet poster
 
Posts: 1
Default Variable List Box Range


Hi Dave, this is the code:

Private Sub Listbox1_Change()

With Sheets(g_Country)
..ListBox1.ListFillRange = ""
..ListBox1.List = .Range("a1", .Cells(.Rows.Count,
"A").End(xlUp)).Value
End With

Dim rng As Range
Set rng = Range(ListBox1.RowSource).Columns(1).Cells
Set rng = rng(ListBox1.ListIndex + 1)

Dim rng As Range
Set rng = Range(ListBox1.RowSource).Columns(1).Cells
Set rng = rng(ListBox1.ListIndex + 1)
Let text1.Text = rng.Text
Let text2.Text = rng.Offset(0, 1).Text
etc....


However, everytime this is run I get an error 438 as ListFillRange is
not supported.
How do I correct this? Thanks!!


--
peter_rivera
------------------------------------------------------------------------
peter_rivera's Profile: http://www.excelforum.com/member.php...o&userid=24495
View this thread: http://www.excelforum.com/showthread...hreadid=381591