A
Andres
Hi all,
I have the problem to assign a variable of type object to
a specific class at runtime. I want to use a string
variable that specify the class a want to set this object.
Is something similar to add a new control to a form using
the controls collection:
Private Sub CommandCreateInstance_Click()
Dim newInstance As Object
Dim strClass as String
strClass = "aClass"
Set newInstance = Me.Controls.Add("VB." & strClass,
newInstanceName, Me)
End Sub
In the example 'aClass' is a Class I made as a Class
module, but with custom classes doesn't work, it has to be
a Control registered in VB.
Has anybody any idea to do this.
Thanks
I have the problem to assign a variable of type object to
a specific class at runtime. I want to use a string
variable that specify the class a want to set this object.
Is something similar to add a new control to a form using
the controls collection:
Private Sub CommandCreateInstance_Click()
Dim newInstance As Object
Dim strClass as String
strClass = "aClass"
Set newInstance = Me.Controls.Add("VB." & strClass,
newInstanceName, Me)
End Sub
In the example 'aClass' is a Class I made as a Class
module, but with custom classes doesn't work, it has to be
a Control registered in VB.
Has anybody any idea to do this.
Thanks