I am really confused what is going on. I am setting a range for a list box, and saying use this specific range but it is looking at the active page still.
So if sheets(1) is active, .rowSource acts if I do sheets(1).Range("A2:B" & lastR).Address vs sheets(2).Range("A2:B" & lastR).Address...
Thoughts
Code:
Private Sub UserForm_Initialize()
Dim ws As Worksheet
Dim lastR As Long
Set ws = Sheets(2)
lastR = ws.Range("A" & Rows.Count).End(xlUp).Row
With Me.lbox
.ColumnCount = 2
.ColumnHeads = True
.RowSource = ws.Range("A2:B" & lastR).Address
End With
End Sub
Thoughts