|
-
Jun 9th, 2012, 11:06 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Load ComboBox Ignore Header Skip Blanks
I want to load my combobox on sheet2 from data in sheet1
The data in sheet1 will vary in size it also contains column headres that i dont want loaded into the combobox
-
Jun 9th, 2012, 11:29 AM
#2
Re: Load ComboBox Ignore Header Skip Blanks
i think u r using RowSource in combo, better use For Next loop, start loop from next row of the header, and if cell is not blank then add to combo.
-
Jun 9th, 2012, 11:31 AM
#3
Thread Starter
Frenzied Member
Re: Load ComboBox Ignore Header Skip Blanks
 Originally Posted by seenu_1st
i think u r using RowSource in combo, better use For Next loop, start loop from next row of the header, and if cell is not blank then add to combo.
give you give me an example I can tweak?
-
Jun 9th, 2012, 11:35 AM
#4
Re: Load ComboBox Ignore Header Skip Blanks
something like this
Code:
Dim i As Long, LastRow As Long
With Sheet1
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To LastRow 'concidered row 1 as header
If .Cells(i, "A") <> "" Then
.ComboBox1.AddItem .Cells(i, "A")
End If
Next i
End With
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|