+ Reply to Thread
Results 1 to 10 of 10

Control Toolbox

  1. #1
    Bob Phillips
    Guest

    Re: Control Toolbox

    You have to MATCH it against the combobox source data in then click event.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "John Data" <[email protected]> wrote in message
    news:[email protected]...
    > If I link a cell in a combo box in the Forms module and look up the first
    > item in a range, the linked cell fills in with number 1. If I select the
    > secong item in the range, number 2 is filled in the linked cell and so on.
    > How can I get the same result by using the combo box in the control

    toolbox
    > menu as it fills in the linked cell with the actual data from the lookup
    > range rather than numbers 1, 2 etc?




  2. #2
    John Data
    Guest

    Re: Control Toolbox

    Hi Bob
    Sorry to be a pain

    What exactly do you mean "MATCH it against the combobox source and click
    event"?


    "Bob Phillips" wrote:

    > You have to MATCH it against the combobox source data in then click event.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "John Data" <[email protected]> wrote in message
    > news:[email protected]...
    > > If I link a cell in a combo box in the Forms module and look up the first
    > > item in a range, the linked cell fills in with number 1. If I select the
    > > secong item in the range, number 2 is filled in the linked cell and so on.
    > > How can I get the same result by using the combo box in the control

    > toolbox
    > > menu as it fills in the linked cell with the actual data from the lookup
    > > range rather than numbers 1, 2 etc?

    >
    >
    >


  3. #3
    Bob Phillips
    Guest

    Re: Control Toolbox

    I thought you might ask that <vbg>

    Say the source data is in Sheet2, cells A2:A20. The combobox returns the
    value, so you match against the source,

    =MATCH(val,Sheet2!A2:A20,0)

    in VBA

    Application.MatchCombobox1.Value, Worksheets("Sheet2").Range("A2:A20"), 0)

    This would be done within the combobox click event

    --
    HTH

    Bob Phillips

    "John Data" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Bob
    > Sorry to be a pain
    >
    > What exactly do you mean "MATCH it against the combobox source and click
    > event"?
    >
    >
    > "Bob Phillips" wrote:
    >
    > > You have to MATCH it against the combobox source data in then click

    event.
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "John Data" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > If I link a cell in a combo box in the Forms module and look up the

    first
    > > > item in a range, the linked cell fills in with number 1. If I select

    the
    > > > secong item in the range, number 2 is filled in the linked cell and so

    on.
    > > > How can I get the same result by using the combo box in the control

    > > toolbox
    > > > menu as it fills in the linked cell with the actual data from the

    lookup
    > > > range rather than numbers 1, 2 etc?

    > >
    > >
    > >




  4. #4
    Bob Phillips
    Guest

    Re: Control Toolbox

    You have to MATCH it against the combobox source data in then click event.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "John Data" <[email protected]> wrote in message
    news:[email protected]...
    > If I link a cell in a combo box in the Forms module and look up the first
    > item in a range, the linked cell fills in with number 1. If I select the
    > secong item in the range, number 2 is filled in the linked cell and so on.
    > How can I get the same result by using the combo box in the control

    toolbox
    > menu as it fills in the linked cell with the actual data from the lookup
    > range rather than numbers 1, 2 etc?




  5. #5
    John Data
    Guest

    Re: Control Toolbox

    Hi Bob
    Sorry to be a pain

    What exactly do you mean "MATCH it against the combobox source and click
    event"?


    "Bob Phillips" wrote:

    > You have to MATCH it against the combobox source data in then click event.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "John Data" <[email protected]> wrote in message
    > news:[email protected]...
    > > If I link a cell in a combo box in the Forms module and look up the first
    > > item in a range, the linked cell fills in with number 1. If I select the
    > > secong item in the range, number 2 is filled in the linked cell and so on.
    > > How can I get the same result by using the combo box in the control

    > toolbox
    > > menu as it fills in the linked cell with the actual data from the lookup
    > > range rather than numbers 1, 2 etc?

    >
    >
    >


  6. #6
    Bob Phillips
    Guest

    Re: Control Toolbox

    I thought you might ask that <vbg>

    Say the source data is in Sheet2, cells A2:A20. The combobox returns the
    value, so you match against the source,

    =MATCH(val,Sheet2!A2:A20,0)

    in VBA

    Application.MatchCombobox1.Value, Worksheets("Sheet2").Range("A2:A20"), 0)

    This would be done within the combobox click event

    --
    HTH

    Bob Phillips

    "John Data" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Bob
    > Sorry to be a pain
    >
    > What exactly do you mean "MATCH it against the combobox source and click
    > event"?
    >
    >
    > "Bob Phillips" wrote:
    >
    > > You have to MATCH it against the combobox source data in then click

    event.
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "John Data" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > If I link a cell in a combo box in the Forms module and look up the

    first
    > > > item in a range, the linked cell fills in with number 1. If I select

    the
    > > > secong item in the range, number 2 is filled in the linked cell and so

    on.
    > > > How can I get the same result by using the combo box in the control

    > > toolbox
    > > > menu as it fills in the linked cell with the actual data from the

    lookup
    > > > range rather than numbers 1, 2 etc?

    > >
    > >
    > >




  7. #7
    John Data
    Guest

    Control Toolbox

    If I link a cell in a combo box in the Forms module and look up the first
    item in a range, the linked cell fills in with number 1. If I select the
    secong item in the range, number 2 is filled in the linked cell and so on.
    How can I get the same result by using the combo box in the control toolbox
    menu as it fills in the linked cell with the actual data from the lookup
    range rather than numbers 1, 2 etc?

  8. #8
    Bob Phillips
    Guest

    Re: Control Toolbox

    You have to MATCH it against the combobox source data in then click event.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "John Data" <[email protected]> wrote in message
    news:[email protected]...
    > If I link a cell in a combo box in the Forms module and look up the first
    > item in a range, the linked cell fills in with number 1. If I select the
    > secong item in the range, number 2 is filled in the linked cell and so on.
    > How can I get the same result by using the combo box in the control

    toolbox
    > menu as it fills in the linked cell with the actual data from the lookup
    > range rather than numbers 1, 2 etc?




  9. #9
    John Data
    Guest

    Re: Control Toolbox

    Hi Bob
    Sorry to be a pain

    What exactly do you mean "MATCH it against the combobox source and click
    event"?


    "Bob Phillips" wrote:

    > You have to MATCH it against the combobox source data in then click event.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "John Data" <[email protected]> wrote in message
    > news:[email protected]...
    > > If I link a cell in a combo box in the Forms module and look up the first
    > > item in a range, the linked cell fills in with number 1. If I select the
    > > secong item in the range, number 2 is filled in the linked cell and so on.
    > > How can I get the same result by using the combo box in the control

    > toolbox
    > > menu as it fills in the linked cell with the actual data from the lookup
    > > range rather than numbers 1, 2 etc?

    >
    >
    >


  10. #10
    Bob Phillips
    Guest

    Re: Control Toolbox

    I thought you might ask that <vbg>

    Say the source data is in Sheet2, cells A2:A20. The combobox returns the
    value, so you match against the source,

    =MATCH(val,Sheet2!A2:A20,0)

    in VBA

    Application.MatchCombobox1.Value, Worksheets("Sheet2").Range("A2:A20"), 0)

    This would be done within the combobox click event

    --
    HTH

    Bob Phillips

    "John Data" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Bob
    > Sorry to be a pain
    >
    > What exactly do you mean "MATCH it against the combobox source and click
    > event"?
    >
    >
    > "Bob Phillips" wrote:
    >
    > > You have to MATCH it against the combobox source data in then click

    event.
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "John Data" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > If I link a cell in a combo box in the Forms module and look up the

    first
    > > > item in a range, the linked cell fills in with number 1. If I select

    the
    > > > secong item in the range, number 2 is filled in the linked cell and so

    on.
    > > > How can I get the same result by using the combo box in the control

    > > toolbox
    > > > menu as it fills in the linked cell with the actual data from the

    lookup
    > > > range rather than numbers 1, 2 etc?

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1