Hello,
I have an Excel workbook with two different user forms. I want to use an Initialize event to populate some combo boxes. On the first user form, everything works great. When I try to use the second one, I get "Run-Time Error 424 Object Required". The debugger highlights the line in the code that calls the user form. I have a feeling the error is somewhere in the Initialize code, because if I remove the initialize code, the user form runs fine.
The code for both forms is almost identical. Only the names are changing. Please help.
I have an Excel workbook with two different user forms. I want to use an Initialize event to populate some combo boxes. On the first user form, everything works great. When I try to use the second one, I get "Run-Time Error 424 Object Required". The debugger highlights the line in the code that calls the user form. I have a feeling the error is somewhere in the Initialize code, because if I remove the initialize code, the user form runs fine.
The code for both forms is almost identical. Only the names are changing. Please help.
Code:
Private Sub UserForm_Initialize()
cmbPartnum.SetFocus
cmbPartnum.List = Array("24921", "24343", "24354", "25925", "11913", "11914-001", "21992-001", "15695", "16550", "50885")
cbmOperator.List = Array("AP", "FN", "LM", "MW", "RB", "JC", "MM")
cmbLaser.List = Array("EGYNGR")
End Sub
Code:
Sub Button2_Click()
ufLaserEntry.Show
End Sub