![]() |
Combo Box Help?
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 ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
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 |
Combo Box Help?
IT WORKED!!! Excellent, thanks for you hel ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
All times are GMT +1. The time now is 06:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com