Greetings Gurus,
I've been working in a small project that uses some ActiveX controls in a WorkSheet. As I was programming these controls, I came across with several repetitive operations, so I tried as much as I could, use Public Functions and Subs, which ones wouldn't have the desired results without the method "Me.OLEObjects". This one I learned here in the community.
However, I decided to try to use a UserForm instead of the ActiveX controls in a Worksheet, and when I was performing the first test, I realized that this method cannot be used inside the UserForm, the message "Method or Data member not found(Error 461)" is issued.
I researched about but found nothing.
Does anyone know how can I replace this feature inside the UserForm?
This is an example:
[VBA]Public Sub PopulateComboBox(ByVal ComboBoxName As String)
Dim Entry, WorkArea As Range
Set WorkArea = Plan1.Range(Cells(18, 2), Cells(Cells(Rows.Count, 2).End(xlUp).Row, 2))
For Each Entry In WorkArea
Me.OLEObjects(ComboBoxName).Object.AddItem Entry.Value
Next Entry
Set WorkArea = Nothing
End Sub[/VBA]
Thanks in advance!
Douglas