Combo Box and smart key selection

  • Thread starter Charles L. Snyder
  • Start date
C

Charles L. Snyder

Hi

I have a spreadsheet (windows xp, MS Office 2003) with several
userforms. One of these has a combo box, populated from the following
code:

Private Sub UserForm_Initialize()

Dim myArr As Variant
With Me.cbStdOP
.ColumnCount = 9 'columns A:I
.ColumnWidths = "180;0;0;0;25;0;0;0;0" 'hide the last 8
columns
End With

With Worksheets("AutoEntry")
myArr = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp)) _
.Resize(, Me.cbStdOP.ColumnCount)
End With

Me.cbStdOP.List = myArr

End Sub

This shows in the combo box only the column A (description) and column
E (numerical codes) entries from the 'AutoEntry' worksheet. The user
scrolls thru these and selects from these choices in the combo box,
and the resulting data is placed into another ws ('Operations'). The
rows in 'AutoEntry' are sorted by column E (numerical codes).

I know this is not the best way to do this. I would like the user to
be able to type the first numbers of the codes and have the combo box
go to that selection (there are > 1500 rows to scroll through on the
AutoEntry ws).

Ideally, there would be a radio button to search by description OR by
numerical code, and the combo box would show the matches.


Thanks for any guidance!

cls
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top