#1   Report Post  
John Data
 
Posts: n/a
Default 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?
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
John Data
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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" wrote in message
...
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" wrote in message
...
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
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 increase the height of a check box from the control toolbox steve-o Excel Discussion (Misc queries) 1 June 9th 05 03:53 AM
Vanishing Control Toolbox Command Buttons Fritz24 Excel Discussion (Misc queries) 2 June 7th 05 01:39 PM
Forms Toolbar vs. Control Toolbox vs. Data Validation for drop dow Scott Excel Discussion (Misc queries) 1 February 1st 05 01:51 PM
Embed command button from the control toolbox doesnt work guichre Excel Worksheet Functions 1 November 16th 04 02:28 AM
Embed command button from the control toolbox doesnt work Roland Excel Worksheet Functions 0 November 16th 04 02:20 AM


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