Hello Josh,
Here is an example of sizing the range before the UserForm is displayed.
Private Sub UserForm_Initialize()
Dim Rng As Range
Set Rng = Range("A1:E1")
Set LastRow = Cells.Find("*", , xlValues, xlWhole, xlByRows, xlPrevious, , False)
If LastRow Is Nothing Then Exit Sub
Set Rng = Rng.Resize(RowSize:=LastRow.Row - Rng.Row + 1)
Set Rng = Rng.Offset(1, 0).Resize(RowSize:=Rng.Rows.Count - 1)
With Me.ListBox1
.ColumnCount = Rng.Columns.Count
.ColumnHeads = True
.RowSource = "=" & Rng.Parent.Name & "!" & Rng.Address
End With
End Sub
Bookmarks