0

I'm trying to populate a Combobox with dynamic range.

The code I have is below.

cmb_modProp_SA1.List = Array(Worksheets("Properties").Range("B2:B" & Rows.Count).End(xlUp).Offset(1, 0).Value)

Any tips on how to get this, as the current code only lists the value in B2.

braX
  • 11,506
  • 5
  • 20
  • 33

1 Answers1

0

Try the following...

With Worksheets("Properties")
    cmb_modProp_SA1.List = .Range("B2:B" & .Cells(.Rows.Count, "B").End(xlUp).Row).Value
End With
Domenic
  • 7,844
  • 2
  • 9
  • 17
  • Worked perfectly. Thanks! I'll have to go through and follow the logic in order to understand it. I've always been weak in the WITH and LOOP areas. I know they're super powerful... but dang, I need help with them. – Anthony Robbins May 18 '20 at 11:42
  • @AnthonyRobbins - I answered someone elses question a while back that has an ok explanation of `With...` and `For...` statements. [You can read it here](https://stackoverflow.com/questions/61467329/how-to-loop-through-worksheets-except-toc/61468889#61468889) – Samuel Everson May 18 '20 at 13:47