Create Control via VBA

  • Thread starter Thread starter Jorge Rite
  • Start date Start date
J

Jorge Rite

Is it possible to create a control and plot it on a form entirely through
VBA?
If so, how would you go about doing it? I'm just trying stuff out since I'm
between projects - but I figure it would be a nice trick to learn.

Thanks in Advance!
 
Ok so I figured out how to do it ... CreateControl()
Don't know how I could have missed that one LoL
 
Whoa, hold on there. CreateControl is a design time
operation and you never want to do that at run time.

Far better is to precreate the control with it's Visible
property set to No. Then, when needed at run time, make the
control Visible and set its Top and Left properties to
position it.
 
Back
Top