Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Reference Combo Box to Column of Data

Question: How do I reference a list of data from a column in a combo box

I have a drop down menu in a Form, I figure use a combo box
I'd like to have it reference a specific name range in a sheet or Column for
instance.
I'll have apples, pears, peaches, etc in Column B
So if a user changes column B then the combo box will reflect that change
when it's opened.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Reference Combo Box to Column of Data

You can use the Userform_initialize event to populate the values into that
combobox.

One way is:

Option Explicit
Private Sub UserForm_Initialize()
With Worksheets("Sheet1")
Me.ComboBox1.List _
= .Range("b1", .Cells(.Rows.Count, "B").End(xlUp)).Value
End With
End Sub

But there are lots of other ways, too. They can be useful if want to format the
values in the combobox (money/time/dates) or want to skip cells that don't meet
a certain criteria.


Benjamin wrote:

Question: How do I reference a list of data from a column in a combo box

I have a drop down menu in a Form, I figure use a combo box
I'd like to have it reference a specific name range in a sheet or Column for
instance.
I'll have apples, pears, peaches, etc in Column B
So if a user changes column B then the combo box will reflect that change
when it's opened.


--

Dave Peterson
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
How to reference to a column of data? Jay Excel Discussion (Misc queries) 4 March 10th 09 08:54 PM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
Select all data in column and list in form combo box burl_rfc Excel Programming 5 April 11th 06 02:47 AM
how do I reference data from a Combo Box? Rick Excel Programming 2 March 31st 06 11:57 PM
Grabbing Data From Second Combo Box Column DBAL[_6_] Excel Programming 5 May 18th 05 02:15 PM


All times are GMT +1. The time now is 06:59 PM.

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"