combobx help!

  • Thread starter Thread starter picric
  • Start date Start date
P

picric

I have a range in Sheet1 A1:A10. I need to populate the
drop down box of a combo box with the values in Sheet1
A1:A10 that are not equal to "no".
 
Picric,

I would write some code to enumerate the elements and test them all
individually, something like this:

Dim X as INT

For X = 1 to 10

If Thisworkbook.Worksheets("Sheet1").Range("A" & X).value = "No" then _
ComboBox1.additem Thisworkbook.Worksheets("Sheet1").Range("A" & X).value

Next X


Or you could probably create a collection element of cells and do something
like

With Cells in Collection (or range)

if .value = "No" then... etc.

End with


Hope that's a good start :)

-Mike Mertes
 

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

Back
Top