I created an Activex Control.

In my application I did not added it to the toolbox. I'm creating it dynamically. This is the code I use:

VB Code:
  1. Dim WithEvents objExt As VBControlExtender ' Declare VBControlExtender variable
  2.  
  3. Private Sub LoadControl()
  4.    Licenses.Add "MyControl.Control"
  5.    Set objExt = Controls.Add("MyControl.Control", "myCtl")
  6. End Sub
  7.  
  8. Private Sub extObj_ObjectEvent(Info As EventInfo)
  9.    ' Program the events of the control using Select Case.
  10.    Select Case Info.Name
  11.    Case "Click"
  12.       ' Handle Click event here.
  13.    ' Other cases now shown
  14.    Case Else ' Unknown Event
  15.       ' Handle unknown events here.
  16.    End Select
  17. End Sub
  18.  
  19.  
  20. Private Sub Command1_Click()
  21.     Call LoadControl
  22. End Sub

I can handle the events. However, does anyone know how I can access the methods and properties I created for the control when adding the control dynamically to the form?

I can use access them fine when I add it to the toolbox.