Hey Chandoo!
I'm trying to populate a activex box with dates that i've listed down a column on a sheet called "Data". This is my first time writing a form in ActiveX, though I've coded some macros.
What is wrong with what I've written? This returns Application-defined or object-defined error.
Thanks for your help, and have an EXCEL-lent holiday.
Private Sub UserForm_Activate()
Dim i As Integer
For i = 1 To Range(Sheets("Data").Range("A1"), Sheets("Data").Range("A1").End(xlDown)).Count
ComboBox1.AddItem Sheets("Data").Range("A1").Offset(i - 1, 0).Value
Next i
End Sub
I'm trying to populate a activex box with dates that i've listed down a column on a sheet called "Data". This is my first time writing a form in ActiveX, though I've coded some macros.
What is wrong with what I've written? This returns Application-defined or object-defined error.
Thanks for your help, and have an EXCEL-lent holiday.
Private Sub UserForm_Activate()
Dim i As Integer
For i = 1 To Range(Sheets("Data").Range("A1"), Sheets("Data").Range("A1").End(xlDown)).Count
ComboBox1.AddItem Sheets("Data").Range("A1").Offset(i - 1, 0).Value
Next i
End Sub