RedOctoberKnight
Board Regular
- Joined
- Nov 16, 2015
- Messages
- 150
- Office Version
- 2016
- Platform
- Windows
Good Morning,
I have the following bit of code that I'm using to fill some combo boxes in a Userform.
The problem I'm having is it's including a bunch of blank cells in the list. I do have one blank cell at the top of the list but I dont need a bunch at the end.
Any suggestions?
Thanks.
I have the following bit of code that I'm using to fill some combo boxes in a Userform.
VBA Code:
Dim LastRow As Long
LastRow = Cells(Rows.Count, "M").End(xlUp).row
ComboBox1.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox2.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox3.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox4.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox5.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox6.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox7.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox8.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
ComboBox9.List = Sheets("SETTINGS").Range("M3:M" & LastRow).Value
The problem I'm having is it's including a bunch of blank cells in the list. I do have one blank cell at the top of the list but I dont need a bunch at the end.
Any suggestions?
Thanks.