Hello everyone,
I am new to this VBA programming. I was trying to create one userform using dependet combobox concept. My program is as shown below:
*********************************************************************************
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Dim lastrow As Long
Dim lastclumn As Long
With Worksheets("REF")
lastcolumn = REF.Cells(1, Columns.Count).End(xlToLeft).Column
For I = 1 To lastcolumn
With .Column(I)
lastrow = REF.Cells(Rows.Count, I).End(xlUp).Row
With Range(Cells(1, I), Cells(lastrow, I))
Range(Cells(1, I), Cells(lastrow, I)).Select
Selection.CreateNames Top:=True
End With
End With
Next I
End With
Me.ComboBox1.RowSource = "Resource Name"
End Sub
*********************************************************************************
I am getting following error after running this program.
**********************************************
ERROR: RUNTIMEERROR 424: OBJECT REQUIRED
**********************************************
It will be really helpful if anyone can help me out to resolve this error
Bookmarks