How-To: Select and Display Combo Box choice with VBA

S

Stu

How To: Using a value from another field I would like to display a certain
selection in a combo box. For example if a user selects 'X' then I would
like to display ITEM(3). What combo box properties/methods should I be using?
 
S

Stu

My question wasn't about the event but what is the VBA code to select and
display a combo box choice.
 
D

Douglas J. Steele

Define "a certain selection in a combo box".

Does your ITEM(3) mean that you want the value of the third row of the combo
box?

Which column of the combo box does you want?

Assuming you want the value of the first value of the third row, you'd use
something like:

Me.NameOfComboBox.Column(0, 2)

(numbering starts at 0)
 
S

Stu

Thanks that got me on the right track. Here is what I was looking for:
Me.NameOfComboBox=Me.NameOfComboBox.Column(0, 2)
Case Closed.
 

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