To simply put it, it's a whole heck of a lot easier to reference all the ActiveX controls (Project/Components...) you'll need and create them as needed. Also, if you use the package and desployment wizard it'll make sure the OCXs are included in your installation. I am not sure what it is exactly you are looking to do, but if you do reference the controls, you can use a control array along with the Load statement to create new indices at runtime. You don't have to use a control array. Reference the rich edit control in your project, Uncheck "Remove information about unused ActiveX Controls" from Project Properties/Make. And run the following code...
Dim MyControl As Control
Private Sub Form_Load()
Set MyControl = Me.Controls.Add("RICHTEXT.RichTextCtrl.1", _
"RichText1", Me)
MyControl.Text = "I'm Dynamic!"
MyControl.Font.Bold = True
MyControl.Font.Italic = True
MyControl.Visible = True
End Sub
Private Sub Form_Resize()
If IsObject(MyControl) Then _
MyControl.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub
Private Sub Form_Unload(Cancel As Integer)
If IsObject(MyControl) Then Set MyControl = Nothing
End Sub
However, in doing this you'll need to know the ProgID for the ActiveX control. I generally, place the control on the form, save it, use the .frm file to get the class name, run it, and get an error message giving me the ProgID. You can also get it from the registry, but I'm lazy. :) If you don't register the control in the project you may have to deal with licensing info in your code. Most MS ActiveX controls require a license to be used. You could create one manually, but this becomes more of a pain than it's worth. Good luck... Jeremy L. Falcon "The One Who Said, 'The One Who Said...'"