Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
ComboBox Question
I am trying to fill a combo box in a user form from a range. I do not
want every cell in range. I want the cell value to be added only if cell.row mod 4 = 0. Can this be done? How? Thanks, Jay |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
ComboBox Question
Something like this maybe (assuming your data is in Column B for this
example)... Dim X As Long, LastRow As Long LastRow = Cells(Rows.Count, "B").End(xlUp).Row For X = 4 To LastRow Step 4 Me.ComboBox1.AddItem Cells(X, "B").Value Next -- Rick (MVP - Excel) "jlclyde" wrote in message ... I am trying to fill a combo box in a user form from a range. I do not want every cell in range. I want the cell value to be added only if cell.row mod 4 = 0. Can this be done? How? Thanks, Jay |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
ComboBox Question
On Aug 27, 1:47*pm, "Rick Rothstein"
wrote: Something like this maybe (assuming your data is in Column B for this example)... * Dim X As Long, LastRow As Long * LastRow = Cells(Rows.Count, "B").End(xlUp).Row * For X = 4 To LastRow Step 4 * * Me.ComboBox1.AddItem Cells(X, "B").Value * Next -- Rick (MVP - Excel) "jlclyde" wrote in message ... I am trying to fill a combo box in a user form from a range. *I do not want every cell in range. *I want the cell value to be added only if cell.row mod 4 = 0. *Can this be done? *How? Thanks, Jay- Hide quoted text - - Show quoted text - Rick, I can work with this. Thanks for the code. I was trying to do it with an array and not having any luck setting that. Thanks, Jay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform combobox question | Excel Discussion (Misc queries) | |||
another combobox question | Excel Discussion (Misc queries) | |||
ComboBox Question | Excel Worksheet Functions | |||
combobox Question | Excel Discussion (Misc queries) | |||
VBA Form ComboBox question | Excel Worksheet Functions |