List Box Items

I am trying to create a list box that is populated with 
items from a row.  For example: A2=red B2=blue C2=green.  
then the first value in the combobox is red, the second is 
blue, the third is green and so on.
0
anonymous (74722)
6/4/2004 8:56:53 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
300 Views

Similar Articles

[PageSpeed] 45

Set the Input Range (if a Forms Listbox) the RowSource property (Controls
listbox), or the ListFillRange (Userform listbox) to that range address.

-- 

HTH

Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jason" <anonymous@discussions.microsoft.com> wrote in message
news:1884c01c44a76$76d9fb50$a001280a@phx.gbl...
> I am trying to create a list box that is populated with
> items from a row.  For example: A2=red B2=blue C2=green.
> then the first value in the combobox is red, the second is
> blue, the third is green and so on.


0
bob.phillips1 (6510)
6/4/2004 10:13:27 PM
Leo Heuser gives instructions in the following post:

   http://groups.google.com/groups?&threadm=eH7E3WpRBHA.2084%40tkmsftngp03

To adapt to your listbox:

Private Sub ListBox1_GotFocus()
   ListBox1.Column = Range("A2:C2").Value
End Sub


Jason wrote:
> I am trying to create a list box that is populated with 
> items from a row.  For example: A2=red B2=blue C2=green.  
> then the first value in the combobox is red, the second is 
> blue, the third is green and so on.


-- 
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

0
dsd1 (5911)
6/4/2004 10:35:18 PM
try this:
sub addMe()
sheets("Sheet1").select
Range("A2").select
do 
set a=selection
with listBox1
..additem (a)  
end with
activecell.offset(0,1).select
loop until a=""
end sub

This is quick and dirty and may add a blank line to the 
bottom of the listbox.

regards
Mark

>-----Original Message-----
>I am trying to create a list box that is populated with 
>items from a row.  For example: A2=red B2=blue C2=green.  
>then the first value in the combobox is red, the second 
is 
>blue, the third is green and so on.
>.
>
0
6/5/2004 2:18:32 AM
Reply:

Similar Artilces:

How do I unpin an item from the list?
In addition to Word 2007 refusing to save documents unless I change the name I now have an old version pinned to the list and it refuses to unpin. Why is this happening, and how can I correct it? I am using Win7 Professional. "Viv" <Viv@discussions.microsoft.com> wrote in message news:F370AAFF-607C-4816-AA0E-A53A944CB026@microsoft.com... > In addition to Word 2007 refusing to save documents unless I change the > name > I now have an old version pinned to the list and it refuses to unpin. Why > is > this happening, and how can I correct it? &g...

Smart List Builder
We just bought Smartlist Builder. Are there any good resources out there for using it? Thanks! There are a few sample SmartLists from Great Plains. They are located in the document library on customer source. -- www.fmtconsultants.com "Wes" wrote: > We just bought Smartlist Builder. Are there any good resources out there for > using it? > > Thanks! > > > ...

Can Drop Down Boxes jump to the answer as you type?
If I create a form with VBA, to create a drop down box to have a list to pick an answer for to fill in a cell in a worksheet, it will jump to the answer in the list as you type. Can a Data|Validation|List do the same thing? If not, is there a way to get that functionality in Excel? Data Validation doesn't support autocomplete. If you can use programming, there are instructions here for adding a combobox from which you can select one of the values from the data validation list. In the combobox, you can enable autocomplete: http://www.contextures.com/xlDataVal11.html rrucksda...

Restricting input box entries to integers
Dear Experts: below macro applies a user-defined paragraph style to rows using an input box. The macro is running fine. But the input box also allows for entries such as 7,2 (comma because I live in Germany). How do I have to re-write the code to only allow integers as input box entries? Help is much appreciated. Thank you very much in advance. Regards, Andreas Sub Tbl_BodyStyle() Dim oRng As Word.Range Dim oTbl As Word.Table Dim AskRowNumber As String Dim blnAsk As Boolean If Not Selection.Information(wdWithInTable) Then MsgBox "Please place the cursor...

Self-Made Combo Boxes not working correctly...
Okay all.. Here's my deal... I have tried and tried and tried to get these to work... I'm going to post what I have done, and what I am trying to do, and see if someone can help me figure crap out... tblBuilding - PK is BuildingIDNum - Autonumber tblBuildingZones - FK is BuildingIDNum via SELECT DISTINCTROW Building.BuildingIDNum, Building.Name FROM Building ORDER BY Building.BuildingIDNum; cboBuilding - This has Building 1, Building 2, etc. The field displaying this info is "Name" in tblBuilding. cboBuildingZones - This has different "zones" for Building 1,...

Distribution List Auto Respond
Hello all, Do any of you know of a way to have Exchange auto respond to messages sent to a distribution list? I do not want to turn on the Send Out-of-Office Messaegs to originator option on because all of the members will have their own OOF messages set up during our Holiday Closure (1 week). The desire is that when people send a message to our Help Desk DL during our closure they would receive a message in return stating that we are closed for the holidays. Thanks for any help with this. Mike Seattle Pacific University You may have to remove everyone from the DL except a temp user wi...

Need help with Combo Box?
I would appreciate any help with this. I currently have a form with two combo boxes and a subform. The first combo box lists counties and the second box lists doctors in selected county. After selecting county, doc the subform lists pts for this doc. All this works fine. However, I need to add a couple of more filters. I am stuck and would like to know how to do this. I don't want to mess up what I already have. How can I incorporate a couple more filters? I thought maybe adding an option box to the form????? Can someone please help me to accomplish this? Thank you. Sure...

Do I need DSClient to run Exchange 5.5 on an NT4.0 box in Windows 2003 Native Mode ADS?
Good Evening, I am in the process of migrating my WinNT4.0 domain and Exchange 5.5 Org to Windows 2003 ADS/Exchange 2003. I know best practice is to change the domain to Native mode, but how does this affect my NT4.0 server running 5.5? Do I need to simply load the DSClient onto the server? I should also note that we did an inplace upgrade from NT 4.0. This is a single domain environment. As long as you no longer have NT 4.0 BDCs you should be able to move to native mode. Your NT 4.0 server running E55 will not be affected (unless of course it is also a BDC). It is a good idea to...

Filtered list
Hi, I hope that some one can help! I want to take a certain range of cells in the file "HCP_2005_upgrade" and filter so as to select all the cells that are not empty. Then select all the rows for these cells and copy them to a new workbook "W_V" in "sheet2". I have the following code. Three problems: 1- When copying to the new workbook I did not have the same column width. What should I do in order to have the same column width? 2- What code do I need to add, and where, so as to let the macro automatically find the last r...

outlook contact list problem
Hello, I've been using Outlook for quite some time and it worked fine. My set-up: At work an english Outlook 2002 At home a german Outlook 2000 To sync I use an IPAQ PPC with Active Sync 3.7 I've now installed bluetooth support and sync even with my SE mobile phone with XTND Before the contact list was on both computers shown as "first last" i.e. Tom Smith, but now suddenly it shows as "Smith, Tom" I checked the settings on both outlooks and it says: "first last" both in - Tools>Options>Contact options> - Tools > E-mail accounts &g...

master list for auto complete data?
Is it possible to have a master list, in my case it's of names, in a workbook that excel will use for auto complete data for that workbook? Thanks Hi Tangy Go to "Tools>Auto Correct Options", select the "Auto Correct" tab and enter the abbreviated items and full names for those items you want Excel to replace. Ensure the relevant boxes are ticked. -- XL2002 Regards William willwest22@yahoo.com "Tangy" <t a n g y@rogers.com> wrote in message news:_OqdnbKPa7IShELcRVn-jQ@rogers.com... | Is it possible to have a master list, in my case it'...

Count of Unique Items?
Hi, I have a worksheet (Sheet1) where column A consists of dates (in date order). I need to look at this column from another sheet (Sheet2) in the same workbook and return the number of unique dates in this column. For example, on Sheet1 cell A1 has the heading Date, A2 is 10/01/04, A3 is 10/01/04, A4 is 10/01/04 and A5 is 10/05/04. From cell A1 on Sheet2 I need to look at the range A2:A5 on Sheet1 and return the number 2 (the number of unique dates in the range). Any help would be greatly appreciated. Monte Sliger Try the following... =SUM(IF(Sheet1!A2:A5<>"",1/COUN...

SQL to update Item.LastCounted based on PhysicalInventory.CloseTime
Because of a bug/deficiency/oversight in a third party inventory counting application , I did a bunch of physical inventories that did not update the Item.LastCounted field. I need this field updated so I can see the correct date each item was counted last. I am willing to do a seperate SQL statement for each physical inventory sheet for which I have the problem. For example, I want to take each item in the PhysicalInventoryEntry table with PhysicalInventory.Code = '0000057' (or whatever the code is) and set Item.LastCounted = PhysicalInventory.CloseTime. I am not great at SQ...

Exmerge lost my calendar items
When I export from Recovery Storage Group, all of my calendar items are gone. If I merge or copy back to original store, they are there. Anyone have any ideas as to why they disappear during an export to .pst? Thanks for your help, Jeff. ...

Using skins in a multiline edit box
Hi, I have a dialog based application, in which I have a multi-line edit control. In the edit control, I would like to have a background image, say some .bmp file. Some status messages are to be displayed in the edit control, based on certain user actions in the dialog. How do I go about this? Thanks, Sucharit you can do it, i think, if you were to create a class which inherited from the edit control, then in the override the OnDraw()/OnPaint() event, where you first get the rect, and draw your bitmap resource, then call the parent event method to do the rest... I don't know if t...

List<string> as class property ?
Hello, is it possible to have a List<whatever> as a property of a class or must you use indexers? If so, please show me an example of the syntax. Thanks. G GiJeet wrote: > Hello, is it possible to have a List<whatever> as a property of a > class or must you use indexers? If so, please show me an example of > the syntax. Thanks. It is possible to have a property, or any number of properties, of type List<whatever> in a class. public class Foo { public List<string> List1 { ... } public List<FileInfo> List2 { ... } } .......

Excel's column width format box
Does anyone know why I am unable to enter a number into Excel's column width box, yet using the mouse, I am able to adjust the width. When opening the text box, I can delete the number that appears, but am unable to even reenter that one after it is deleted. I must tell you that I'm a new user who's working through numerous tutorials. Thanks, Hi do you get an error message or what happens exactly -- Regards Frank Kabel Frankfurt, Germany rly2rys wrote: > Does anyone know why I am unable to enter a number into Excel's > column width box, yet using the mouse, I am ...

Why do sheet tabs keep disappearing? Box in Tools is checked.
When I open a new or existing Excel file, the sheet tabs at the bottom may or may not show up. I have repeatedly gone to Tools, Options, View and made sure the sheet tabs box is checked, but still no tabs. How do I get them back? I can't get from one page of a workbook to another. This is in Offfice 2003. Hi Arlie, Try Tools/Options/General In the Sheets in new workbook box, check and see how many sheets are set to appear when opening a new workbook. Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://w...

Inactive Items 12-17-09
I ran the Inventory Wizard 2 days ago and used the 210 worksheet to make some 4,000 items inactive. I selected "Enter items manually" and imported them from a .csv file. The file had 4 columns: The item number, description, department and the 4th column had the work "Inactive." The process worked properly in HQ but did not propogate to the stores. I am running version 2, sp2. Did you create a worksheet to send this to the stores? Afshin Alikhani - afshin@rrdisti.com Retail Realm Distribution = = = = = = = = "Rick@ASP" <RickASP@discussion...

Creating a list of info in A1 cell in multiple worksheets
How can I create a list of the info/contents in the A1 cell in multiple worksheets? I am trying to create a summary worksheet of the data from 90 worksheets and would like to be able to list the headers in the A1 cell vertically. 'Right click on the summary sheet tab, and paste in this macro. 'Edit where appropriate: Sub CreateSummary() 'Starting row for summary: i = 1 For Each Sheet In ThisWorkbook.Sheets If Sheet.Name <> Me.Name Then 'Control What column to place data in Me.Cells(i, "A").Value = Sheet.Range("A1").Value i = i + 1...

Check Boxes #6
Is there an "easy" way to add check boxes to a worksheet? As it stands, I have to manually attach it to the underlying cell, and adjust the size. I would like to add several hundred checkboxes. Am I doing somethig wrong, or is it just that akward and labor intensive in Excel? Hi Adam, Try: '=============>> Public Sub Tester01() Dim SH As Worksheet Dim rng As Range Dim rCell As Range Set SH = ActiveSheet '<<==== CHANGE Set rng = SH.Range("A1:A100") '<<==== CHANGE Application.ScreenUp...

Synchronize combo boxes
I am trying to sync to combo boxes on a form. It is for plant names which consist of Genus + Species + Subspecies, basically. I have all my data in a single table and I want only applicable species to show up for a particular Genus, for example: Abies concolor Abies glauca Abies alba Quercus alba Quercus macrocarpa Any genus can have many species, some of those species names can exist within multiple Genus names, I have made to seperate tables with just Genus and just Species names, I want them to link in the combo boxes, any ideas? Previously responded to... Regards ...

Random List from Query
For accrediation purposes we have to audit a random 10% of our cases each quarter I was wondering if there is a way to run a query or report that would let me show a random 10% of cases for a specific provider. ...

List of items with commissions
Is there a report that will list items that have a commission set on them? I want to be able to email our sales reps a list, but haven't found a good way to do it. The report I'd like, but don't know how to create would have department, category, item, price, and commission amount. Thanks for any help, -CP Hi there, Retail Analytics from Professional Advantage will enable you to create that report. Basically anything that is captured in RMS can be reported on in Retail Analytics. If you would like to take a look at the product, a quick movie is available at http://www.p...

Conditional Formatting for Image box on Continuous Forms
Hello again, This problem is driving me crazy. I am a car enthusiast and love taking photos of classic cars. I have a table which describes the make and model in a series of fields. There are several fields that contain a reference to photos of those cars. Ie: the fields are called "Front" "Side" "Rear" "Angle". My form has four image boxes to display the images stored in these fields. But when I open the form all the records show the images of the first car only. I asked about this a few days ago and was advised to check out http://www.lebans.co...