Simple Code to Create a Control Dynamically with events
Simple Code to Create a Control Dynamically with events
API Declarations
'[email protected]
'You Can create any controls with this method
'by declaring a object to the appropriate controls
Public WithEvents Cmd as CommandButton
Rate Simple Code to Create a Control Dynamically with events
(1(1 Vote))
Set Cmd = Me.Controls.Add("VB.CommandButton","Command1")
With Cmd
.Enabled = true
.top = 2000
.left = 2000
.height = 450
.width = 2500
.caption = "Click"
.visible = True
End With
End Sub
Private Sub Cmd_Click()
Simple Code to Create a Control Dynamically with events Comments
No comments yet — be the first to post one!
Post a Comment