Combo Box Help?

  • Thread starter Thread starter Xispo
  • Start date Start date
X

Xispo

Hi,

Hi I have 2 columns of data, one with names (column a), the othe
column (column b) says active or inactive on a sheet called names


I have a form with a combo box, how do I make the combo box list th
names from column a of only the names which have inactive in column B

Any help would be great thanks
 
The following macro should help
I checks, if a cell in column(2) has a value "inactive", then, the adjacent value in column(1) is insert into the combobox

Private Sub UserForm_Activate(
Dim tmp As Intege

With Worksheets("names").Range("A1").CurrentRegio
For tmp = 1 To .Rows.Coun
If UCase(.Columns(2).Cells(tmp).Value) = "INACTIVE" The
ComboBox1.AddItem .Columns(1).Cells(tmp).Valu
End I
Nex
End Wit
If ComboBox1.ListCount > 1 Then ComboBox1.ListIndex =
End Sub
 
Back
Top