by breax (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 20th May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
You may create controls in run time using this short code
Private Sub cmdCreate_Click()
'create the object command button
Set NewObject = Controls.Add("VB.CommandButton", "MyControls")
'set properties of the new added control
NewObject.Visible = True
NewObject.Caption = "here"
NewObject.Left = 500
NewObject.Top = 1000
NewObject.Height = 1000
End Sub