Inserting from a list box?

  • Thread starter Thread starter Julian Blair
  • Start date Start date
J

Julian Blair

Hi,
Back for more help!
Can anybody assist me with this task:
I have a long list of product descritions each have an abreviated code
in the cell adjacent it. I would like to be be to select from a list
box? of the descriptions and have the abreviated code inserted into a
cell in my summary sheet. I would even settle for a list box that had
2 colomns so i could scroll through the descrptions list to find the
abreviated code and then input it in the summary list myself.
Julian
 
Is this a worksheet listbox? If codes in the sheet are to the left of
descriptions, set the ListFillRange (RowSource for a listbox in a userform)
equal to that range of both columns, the ColumnCount equal to 2,
ColumnWidths equal to 0; and the LinkedCell (ControlSource for listbox in a
userform) to wherever you want the result.

If the sheet data configuration is descriptions to the left of codes, then
do everything above except the LinkedCell part and the ColumnWidths should
instead be ;0. In the listbox's DblClick event add:

With ListBox1
Range("F1").Value = .List(.ListIndex, 1)
End With

for more info about listboxes please see
http://www.rubbershoe.com/listbox.htm
 
Back
Top