Skyybot
Well-known Member
- Joined
- Feb 18, 2023
- Messages
- 1,110
- Office Version
- 365
- Platform
- Windows
Can anyone tell me why there are two extra, blank lines at the end of my Combobox? (Sorry for the pic. I got an Overflow error with XL2BB)
VBA Code:
Private Sub ComboBox1_DropButtonClick()
Dim cfName As String, clName As String, custList As Range
Dim lRow As Long, cell As Range, custData As Range
Dim i As Long
Me.Cells(1, 1).Select
lRow = Me.Rows(Me.Rows.Count).End(xlUp).Row
Set custList = Me.Range("A2:G" & lRow)
With Me.ComboBox1
.ColumnCount = 2
.ColumnHeads = False
.ListFillRange = custList.Range(custList.Cells(1, 1), custList.Cells(lRow, 2)).Address
.DropDown
End With
End Sub