LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default A Form's Rowsourse Format

If data is on a sheet that is not active,
when you open the userform use this
version:

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

(External:=True) includes the path to Address.

LeoH


"Leo Heuser" skrev i en meddelelse
...
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.






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Having one form show another form's input? Lucosa New Users to Excel 3 June 13th 06 04:16 PM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM
Pass Variables into Form's code Stuart[_5_] Excel Programming 3 August 23rd 03 04:55 AM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"