Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add item to combobox in sheet
Hi everyone. I need to add items to a combobox with the following criteria
p.s. the names of the comboboxes are cb1, cb2, cb3 etc. and the cb's are on the worksheet, not in a userform. also, do i need to set rng every time i activate a diff sheet? just wondering Any Help would be great! Thanks Public Sub SearchUnstamped() Dim rng As Range Dim n As Integer Dim i As Integer Dim j As Integer Set rng = Range("G6:G100") j = 1 n = ThisWorkbook.Worksheets.Count For i = 5 To n Sheets(i).Activate j = j + 1 For Each cel In rng If cel.Value = "" Then If Cells(cel.Row, 1).Value < "" Then If cel.Interior.ColorIndex < 15 Then 'Something like - cb(j).additem = Cells(cel.row, 1).value 'I need this section to take the value of column A and add 'it to the combobox. End If End If End If Next Next end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to display the first Item in a combobox as the default item | Excel Programming | |||
How to display the first Item in a combobox as the default item | Excel Programming | |||
item limit for a combobox? | Excel Worksheet Functions | |||
Don't add item in combobox ... | Excel Programming | |||
Combobox Add Item | Excel Programming |