Thread: Combo Box Help?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Edwin Tam (MS MVP) Edwin Tam (MS MVP) is offline
external usenet poster
 
Posts: 48
Default Combo Box Help?

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