Question Locked

Multiple dynamic controls

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to create controls at run-time in VB. That is, if i want to add a text box in the form, etc, at run-time. I know the method for the same for control array, if one element of the control-array is placed on form, at design-time. But what to do if the control is not of control array type.
Also, please give me the code if possible.
Also, please let me know if it can be possible in MS-Access project or not.

2 replies

by ramaravind1986

Private WithEvents millimg2 As Image
Set agvimg2 = Controls.Add("Vb.Image", "agvimg2")

this is an example of creating a image control similarly follows the rest.

This discussion is closed to new replies.