LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 542
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display the first Item in a combobox as the default item Nigel Excel Programming 2 December 8th 06 10:21 PM
How to display the first Item in a combobox as the default item Jim Cone Excel Programming 0 December 8th 06 06:42 PM
item limit for a combobox? KarenH Excel Worksheet Functions 3 July 20th 06 09:30 PM
Don't add item in combobox ... Marie J-son[_7_] Excel Programming 4 December 9th 05 03:04 PM
Combobox Add Item MBlake Excel Programming 4 May 2nd 05 04:15 PM


All times are GMT +1. The time now is 02:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"