-
dynamic control problem
I'm creating 3 dynamic text boxes at run time as follows...
Option Explicit
Private WithEvents txtcd As Vb.TextBox
Private Sub Form_Load()
For i=0 to 3
Set txtcd = Form1.Controls.Add("VB.Textbox",i )
txtcd.Visible = True
Next i
End Sub
...If I program code within the events for the dynamic controls
(ex. txtcd_Click) it always references the last control created.
(ex. txtcd.name = 3)
...how do we reference each control to have it's own events without using
a dynamic control array?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|