Hello again and thanks to anyone who reads this. (Excel 2016)
I have a simple userform with 2 combobox's and a command button. The Userform is called from a button on a spreadsheet. The issue is that the combobox's do not populate on the first call. I have to close the UF and then reopen it before it works correctly.
Any help is greatly appreciated.
Thanks
I have a simple userform with 2 combobox's and a command button. The Userform is called from a button on a spreadsheet. The issue is that the combobox's do not populate on the first call. I have to close the UF and then reopen it before it works correctly.
Code:
Sub Button1_Click()
Dim FinalRow As Long
Dim FinalRow2 As Long
UserForm1.Show
FinalRow = Worksheets("Reference").Cells(Application.Rows.Count, 1).End(xlUp).Row
FinalRow2 = Worksheets("Reference").Cells(Application.Rows.Count, 2).End(xlUp).Row
UserForm1.ComboBox1.List = Sheets("Reference").Range("A2:A" & FinalRow).Value
UserForm1.ComboBox2.List = Sheets("Reference").Range("B2:B" & FinalRow2).Value
End Sub
Any help is greatly appreciated.
Thanks
Last edited: