Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Populating data in ComboBoxes on UserForms

Hi

I am trying to create a User from that has a drop-down for the user to
select from a pre-defined list.

I have created a combobox on the user form and have no idea how to
populate my list into this when the form opens for the user.

Is there is something really basic I am missing here? I have tried
playing around with ComboBox.AddItem "xxx" for example.
The combo box is still blank when I open the user form:(

Martin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Populating data in ComboBoxes on UserForms

You've got it but I think your timing is off. Where are you adding items.
Typically you activate the userform with userform1.show somewhere like in the
workbook open event, well before you show it, add all of your items.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


" wrote:

Hi

I am trying to create a User from that has a drop-down for the user to
select from a pre-defined list.

I have created a combobox on the user form and have no idea how to
populate my list into this when the form opens for the user.

Is there is something really basic I am missing here? I have tried
playing around with ComboBox.AddItem "xxx" for example.
The combo box is still blank when I open the user form:(

Martin


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Populating data in ComboBoxes on UserForms


Excellent, thanks dude :)


On 14 Aug, 19:38, John Bundy (remove) wrote:
You've got it but I think your timing is off. Where are you adding items.
Typically you activate the userform with userform1.show somewhere like in the
workbook open event, well before you show it, add all of your items.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

" wrote:
Hi


I am trying to create a User from that has a drop-down for the user to
select from a pre-defined list.


I have created a combobox on the user form and have no idea how to
populate my list into this when the form opens for the user.


Is there is something really basic I am missing here? I have tried
playing around with ComboBox.AddItem "xxx" for example.
The combo box is still blank when I open the user form:(


Martin



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Populating data in ComboBoxes on UserForms

There are two ways to populate the combobox. If it is a single column and
your data source is located in a single row or single column on the
worksheet, you can use the row source in the combobox properties by entering
the cell range reference, exmp: a10:a20.

If you want to use the AddItem method. Put it in the UserForm_Initialize
code module. When you then execute the command UserForm1.Show, the
Initialize code executes first and loads the combo box.

"John Bundy" wrote:

You've got it but I think your timing is off. Where are you adding items.
Typically you activate the userform with userform1.show somewhere like in the
workbook open event, well before you show it, add all of your items.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


" wrote:

Hi

I am trying to create a User from that has a drop-down for the user to
select from a pre-defined list.

I have created a combobox on the user form and have no idea how to
populate my list into this when the form opens for the user.

Is there is something really basic I am missing here? I have tried
playing around with ComboBox.AddItem "xxx" for example.
The combo box is still blank when I open the user form:(

Martin


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
Help needed - populating comboboxes from list?? merjet Excel Programming 0 January 19th 07 03:57 AM
Populating Comboboxes nannon8 Excel Programming 2 January 11th 07 09:29 AM
Comboboxes on userforms [email protected] Excel Programming 1 August 21st 06 07:52 PM
comboboxes, userforms and class modules natanz[_2_] Excel Programming 3 November 29th 05 02:59 PM
Populating ComboBoxes WIlliam Barnes Excel Programming 2 February 29th 04 11:26 AM


All times are GMT +1. The time now is 09:54 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"