This is what I am attempting to do...I want to create an instance of the VB
.CommandButton class in code, without drawing an actual object on the form until run time.
something along the lines of;
dim x as object
set x = new vb
but this doesn't work...(and i don't know how to make it =o(
alternitavely...I tried creating instances of the commandbutton class from an existing control drawn on the control at design time. the name of the control was "Command1", and here is the code I wrote that failed to duplicate it.
Dim MyObject As Object
Set MyObject = New Command1
I get "User defined-type not defined!" error. However, if I set it as...a copy of my form(form1), then it works just fine. Is there a reason I can't reference the controls already on the forms...and not just the forms themselves when trying to do this? Is there an easier way?