Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting list box contents

Here is what I am trying to do.

I have a worksheet named Vendor List

Cells D4 to D33 contain the data

Now I want to create a userform (i know how to do that)
with a
list box (know how to do that) but what I can not figure
out
is how to get that D4 to D33 data into the listbox for the
user to select. Valadation is no good in this instance
because
I want to be able to insert the users selection in
different
worksheets.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Setting list box contents

You can copy this event in the Userform mudule to fill your listbox

Private Sub UserForm_Initialize()
ListBox1.List = Sheets("Sheet1").Range("d4:d33").Value
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"P Dudesek" wrote in message ...
Here is what I am trying to do.

I have a worksheet named Vendor List

Cells D4 to D33 contain the data

Now I want to create a userform (i know how to do that)
with a
list box (know how to do that) but what I can not figure
out
is how to get that D4 to D33 data into the listbox for the
user to select. Valadation is no good in this instance
because
I want to be able to insert the users selection in
different
worksheets.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Setting list box contents

mudule ..module

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ron de Bruin" wrote in message ...
You can copy this event in the Userform mudule to fill your listbox

Private Sub UserForm_Initialize()
ListBox1.List = Sheets("Sheet1").Range("d4:d33").Value
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"P Dudesek" wrote in message ...
Here is what I am trying to do.

I have a worksheet named Vendor List

Cells D4 to D33 contain the data

Now I want to create a userform (i know how to do that)
with a
list box (know how to do that) but what I can not figure
out
is how to get that D4 to D33 data into the listbox for the
user to select. Valadation is no good in this instance
because
I want to be able to insert the users selection in
different
worksheets.

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Setting list box contents

Set the Rowsource property of the listbox on the userform to the
following.....
(Change the sheet to the one with the list data)

Sheet1!D43:D33

Alternatively programmatically fill the list box by use the .additem method
and reading the data range. This method is more elegant and allows the
range to expand and contract as controlled by the range definition in your
programme.

Cheers
N.



"P Dudesek" wrote in message
...
Here is what I am trying to do.

I have a worksheet named Vendor List

Cells D4 to D33 contain the data

Now I want to create a userform (i know how to do that)
with a
list box (know how to do that) but what I can not figure
out
is how to get that D4 to D33 data into the listbox for the
user to select. Valadation is no good in this instance
because
I want to be able to insert the users selection in
different
worksheets.

Thanks





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Setting list box contents

Alternatively programmatically fill the list box by use the .additem method
and reading the data range.


Using the ListBox's list method is quicker i.e.

ListBox1.List = Range("D4:D33").Value

--

"Nigel" wrote in message ...
Set the Rowsource property of the listbox on the userform to the
following.....
(Change the sheet to the one with the list data)

Sheet1!D43:D33

Alternatively programmatically fill the list box by use the .additem method
and reading the data range. This method is more elegant and allows the
range to expand and contract as controlled by the range definition in your
programme.

Cheers
N.



"P Dudesek" wrote in message
...
Here is what I am trying to do.

I have a worksheet named Vendor List

Cells D4 to D33 contain the data

Now I want to create a userform (i know how to do that)
with a
list box (know how to do that) but what I can not figure
out
is how to get that D4 to D33 data into the listbox for the
user to select. Valadation is no good in this instance
because
I want to be able to insert the users selection in
different
worksheets.

Thanks





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Setting list box contents

Thanks Ron, That is what I have been trying to do. I am trying to learn
this by myself. But that had me stumped.

"Ron de Bruin" wrote in news:#P5rYERtDHA.640
@tk2msftngp13.phx.gbl:

You can copy this event in the Userform mudule to fill your listbox

Private Sub UserForm_Initialize()
ListBox1.List = Sheets("Sheet1").Range("d4:d33").Value
End Sub



Reply
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
Data Validation "List" - Setting length of list shown Dave Excel Discussion (Misc queries) 3 January 31st 08 06:51 PM
TAB as list separator via regional setting Udo Excel Discussion (Misc queries) 0 November 8th 06 09:09 PM
Setting up a price list G4 Excel Worksheet Functions 4 February 10th 06 10:16 PM
List box - setting default selection Brian Excel Discussion (Misc queries) 2 January 26th 05 08:47 PM
Setting up a random list from long list of names ? yorkshire exile Excel Discussion (Misc queries) 4 January 6th 05 01:44 PM


All times are GMT +1. The time now is 07:14 AM.

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

About Us

"It's about Microsoft Excel"