I assume the objects are things such as Command Buttons and Text Boxes?
VB Code:
Private Function CreateNewInstance(frm As Form, obj As Object) If TypeOf obj Is CommandButton Then Set obj = frm.Controls.Add("VB.COMMANDBUTTON", "NewCommandButton") obj.Visible = True End If End Function
Is this what you are after?
Phreak




Reply With Quote