Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Entering from List box
I have a range of data that I wish to use a list box so that the data
of choice is entered into the cell I am clicked into. IE, if i am in cell B2 and I select from the list box "Product 2), I wish that data (Product 2) to be entered into B2. How can I do that? TIA Sheila |
#2
|
|||
|
|||
Sorry, make that a combo box, not a list box.
Sheila On Sat, 21 May 2005 12:03:40 +1200, Sheila (remove underscores) wrote: I have a range of data that I wish to use a list box so that the data of choice is entered into the cell I am clicked into. IE, if i am in cell B2 and I select from the list box "Product 2), I wish that data (Product 2) to be entered into B2. How can I do that? TIA Sheila |
#3
|
|||
|
|||
You could have the code in the onchange event for the combo-box
Private Sub ComboBox1_Change() ActiveCell.Value = ComboBox1.Value End Sub I assume that you first select a cell where you want the value of the combobox to go. If not (i.e. you want it to go to a particular cell), then you could change the line to: Range("B2") = ComboBox1.Value Mangesh "Sheila" (remove underscores) wrote in message ... Sorry, make that a combo box, not a list box. Sheila On Sat, 21 May 2005 12:03:40 +1200, Sheila (remove underscores) wrote: I have a range of data that I wish to use a list box so that the data of choice is entered into the cell I am clicked into. IE, if i am in cell B2 and I select from the list box "Product 2), I wish that data (Product 2) to be entered into B2. How can I do that? TIA Sheila |
#4
|
|||
|
|||
Thanks Mangesh, it works just fine (I think), but what do you mean by
having the code in the onchange event for the combo box? where is that? TIA sheila Mangesh wrote: You could have the code in the onchange event for the combo-box Private Sub ComboBox1_Change() ActiveCell.Value = ComboBox1.Value End Sub I assume that you first select a cell where you want the value of the combobox to go. If not (i.e. you want it to go to a particular cell), then you could change the line to: Range("B2") = ComboBox1.Value Mangesh "Sheila" (remove underscores) wrote in message ... Sorry, make that a combo box, not a list box. Sheila On Sat, 21 May 2005 12:03:40 +1200, Sheila (remove underscores) wrote: I have a range of data that I wish to use a list box so that the data of choice is entered into the cell I am clicked into. IE, if i am in cell B2 and I select from the list box "Product 2), I wish that data (Product 2) to be entered into B2. How can I do that? TIA Sheila |
#5
|
|||
|
|||
I assume you are using a combobox for the purpose. Select the combo-box
(design mode is ON). Double click to view the VB editor where you could enter the code for the combobox Mangesh wrote in message ups.com... Thanks Mangesh, it works just fine (I think), but what do you mean by having the code in the onchange event for the combo box? where is that? TIA sheila Mangesh wrote: You could have the code in the onchange event for the combo-box Private Sub ComboBox1_Change() ActiveCell.Value = ComboBox1.Value End Sub I assume that you first select a cell where you want the value of the combobox to go. If not (i.e. you want it to go to a particular cell), then you could change the line to: Range("B2") = ComboBox1.Value Mangesh "Sheila" (remove underscores) wrote in message ... Sorry, make that a combo box, not a list box. Sheila On Sat, 21 May 2005 12:03:40 +1200, Sheila (remove underscores) wrote: I have a range of data that I wish to use a list box so that the data of choice is entered into the cell I am clicked into. IE, if i am in cell B2 and I select from the list box "Product 2), I wish that data (Product 2) to be entered into B2. How can I do that? TIA Sheila |
#6
|
|||
|
|||
Thanks, thats what I thought it was. Works great, thanks very much.
Sheila |
#7
|
|||
|
|||
Hi Sheila,
Thanks for the feedback. Mangesh "Sheila" wrote in message oups.com... Thanks, thats what I thought it was. Works great, thanks very much. Sheila |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
loop trough e-mail address list to send task lists with outlook | Excel Discussion (Misc queries) | |||
LOOP - Adddress List -to email | Excel Discussion (Misc queries) | |||
Refresh a Validation List? | Excel Discussion (Misc queries) | |||
Extracting Values on one list and not another | Excel Discussion (Misc queries) | |||
Creating a list from an existing list. | Excel Worksheet Functions |