I think this is what you are trying to do
Private Sub UserForm_Initialize()
Dim nextnumber As Long
Dim rNumbers As Range
Set rNumbers = Sheets("RESULTS").Range(Cells(3, 3), Cells(Rows.Count, 3).End(xlUp))
Application.ScreenUpdating = False
With Worksheets("DATA")
UserForm1.ComboBox1.List = .Range(.Cells(2, 1), .Cells(.Rows.Count, 1).End(xlUp)).Value
UserForm1.ComboBox2.List = .Range(.Cells(2, 2), .Cells(.Rows.Count, 2).End(xlUp)).Value
UserForm1.ComboBox3.List = .Range(.Cells(2, 3), .Cells(.Rows.Count, 3).End(xlUp)).Value
End With
nextnumber = Application.WorksheetFunction.Max(rNumbers) + 1
MsgBox nextnumber
UserForm1.TextBox3.Value = nextnumber 'ActiveCell.Value + 1
End Sub
Just my opinion but I would definitely lose the greenn background of the userform
Bookmarks