View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leo Heuser[_2_] Leo Heuser[_2_] is offline
external usenet poster
 
Posts: 111
Default A Form's Rowsourse Format

John

No problem, as long as the rowsource points to
an address.

E.g.
Set Block1 = Sheets("Sheet1").Range("D1:D5")
Me.ListBox1.RowSource = Block1.Address


Set Block2 = Range(Cells(1, 4), Cells(5, 4))
Me.ListBox1.RowSource = Block2.Address


--
Best Regards
Leo Heuser
Excel MVP
Followup to newsgroup only please.



"John T Ingato" skrev i en meddelelse
...
1) Is it true that the rowsourse format must be equivalent to an Excel
reference, for example

RepEntryBox.RowSource = "'Names'!A1:A5" & NameCount

or using a variable

RepEntryBox.RowSource = "'Names'!A1:A" & NameCount


2) Or is it possible to set this property in a VBA format

Rowsource = Range(cells(1,1), (1,5)) or even

Rowsource = MyRange;... where MyRange is set to a range obj.