Re: 2 column drop down lists

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jim May (jmay_at_cox.net)
Date: 02/15/05


Date: Tue, 15 Feb 2005 08:24:38 -0500

Thanks Bob for the code - I've printed it out so as to review
it between stop-lights (as I now leave for work).
Jim

"Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
news:ezAjvn1EFHA.3384@tk2msftngp13.phx.gbl...
> Hi Jim,
>
> The boundcolumn property identifies which column is selected when the
> combobox is clicked. So if you want column 1 value, you don't need to set
> that property as that is the default. If you want the second, set it to 2,
> etc. If you set the BoundColumn value greater than the ColumnCount value,
> you get #N/A.
>
> If you want to pick up multiple columns from the combobox, you will need
to
> manage it within the click event, it only links back to 1 even if you
> specify multiples.
>
> There is nothing to automatically do the second part, but you could drive
it
> yourself in the click event of the combobox (remember this is a control
> toolbox combobox) with code like this
>
> Private Sub ComboBox1_Click()
> Dim target As String
>
> With Me.ComboBox1
> target = .LinkedCell
> .LinkedCell = Me.Range(target).Offset(1, 0).Address
> End With
> End Sub
>
>
> Regards
>
> Bob
>
> "Jim May" <jmay@cox.net> wrote in message
> news:6IlQd.63794$jn.51653@lakeread06...
> > Bob:
> > experimenting with this I also had to change "Bound Column" to 2.
> > I suppose that only one of the 2 columns in the FillListRange can be
> > pasted in...
> > Also, don't suppose that one could (/??? - however ??) have Linked Cell
> > advance by 1 - Originally set to say B1 and with each select/paste
> > the data move downward B2, B3, B4 etc,,,
> > TIA,
> > Jim
> >
> > "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
> > news:OH3jUs0EFHA.2232@TK2MSFTNGP14.phx.gbl...
> > > Use a combobox from the controls toolbox, set the data up in a table
and
> > set
> > > the ListFillRange property of the combo to that table, and set the
> > > columncount property to 2.
> > >
> > > --
> > >
> > > HTH
> > >
> > > RP
> > > (remove nothere from the email address if mailing direct)
> > >
> > >
> > > "peterm" <peterm@discussions.microsoft.com> wrote in message
> > > news:40EA26AE-458C-400A-B35B-7CD062D3D455@microsoft.com...
> > > > Hi Jeff
> > > > If you want eg Column 1 NY column 2 New York use a vlookup.
> > > > If this is want you want let me know & I will send it.
> > > > Peterm
> > > >
> > > > "Jeff" wrote:
> > > >
> > > > > I know that I have seen this before, but I can't recall
> > > > > how to do it. I want to create a drop down list with 2
> > > > > columns. e.g. column 1 would be state short forms and
> > > > > column 2 would be the full name.
> > > > >
> > > > > Any suggestions would be greatly appreciated.
> > > > >
> > > > > Jeff
> > > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: copy conditional format as ACTUAL format
    ... "Jim May" wrote in message ... > Private Sub Worksheet_SelectionChange ... > "Bob Phillips" wrote in message ... >>>> Dana, ...
    (microsoft.public.excel.misc)
  • Re: Data Validation If statement moved to userform
    ... "Bob Phillips" wrote: ... >> Private Sub Worksheet_Change ... >> have created the combobox on the userform, ...
    (microsoft.public.excel.programming)
  • Re: Error in Code
    ... Jim ... > Bob Phillips ... >> Private Sub Worksheet_Change(ByVal Target As Range) ...
    (microsoft.public.excel.programming)
  • Re: 2 column drop down lists
    ... The boundcolumn property identifies which column is selected when the ... If you want to pick up multiple columns from the combobox, ... Private Sub ComboBox1_Click ... Bob ...
    (microsoft.public.excel.misc)
  • RE: Go To Button on a spreadsheet.
    ... "Bob" wrote: ... If i take the combobox away and just type a name into a ... Obviously i am not referencing the Combobox ... Private Sub CommandButton1_Click ...
    (microsoft.public.excel.worksheet.functions)