Link to home
Start Free TrialLog in
Avatar of konglok
konglok

asked on

create automatically object component

i want to create automatically object button, label ,etc..
by programming vb6
what is command create it ?
ASKER CERTIFIED SOLUTION
Avatar of alokanant
alokanant

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of corvanderlinden
corvanderlinden

The command you need is

Form1.Controls.Add "VB.CommandButton", "cmdObj1"
   With Form1!cmdObj1
      .Visible = True
      .Width = 2000
      .Caption = "Dynamic Button"
   End With
End Sub
If you are using VB6 you do not need a control array as suggested by alokanant