Sub brands() UserForm1.ScrollBar1.ControlSource = Sheets("config").Range("A2")
UserForm1.Show
End Sub
Private Sub UserForm_Activate() Dim xlsettings As Worksheet
Dim xlworkbook As Workbook
Dim rngexternal As Range
Dim lastrow As Long
Set xlworkbook = Application.Workbooks("data.xlsm")
Set xlsettings = xlworkbook.Worksheets("config")
With xlsettings
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Offset(0, 0).Row
End With
Set rngexternal = xlsettings.Range("a2:a" & CStr(lastrow))
End Sub