adding controls from VBA

  • Thread starter Thread starter nath
  • Start date Start date
N

nath

Hi

Can anyone advise me on how to add controls, such as
labels and text boxes to a form using VBA?

TIA

Nath.
 
nath said:
Can anyone advise me on how to add controls, such as
labels and text boxes to a form using VBA?


Since this is a design time thing to do, it's only practical
to do when you are creating a wizard kind of procedure to
help out during application design. With that firmly in
mind, the CreateControl method is how it would be done.

If you were thinking of doing this in a running application,
then you should precreate a bunch of "extra" invisible
controls in the form and then make them visib;e when needed.
 
Marshall Barton said:
Since this is a design time thing to do, it's only practical
to do when you are creating a wizard kind of procedure to
help out during application design. With that firmly in
mind, the CreateControl method is how it would be done.
If you were thinking of doing this in a running application,

Can't be done, afaik. I've even tried having a form close itself then
re-open itself in acDesign!

Cheers,
TC
 
Back
Top