add button to UserForm programmatically

  • Thread starter Thread starter aaronfude
  • Start date Start date
A

aaronfude

Hi,

Just read this article by MS.

But how to add an OK button? What is the equivalent of
"Forms.CheckBox.1"? What about other types of components. Is there a
single reference to all of this. Also, once I learn to add a button,
how to attach code to it?

Many thanks in advance!

Aaron Fude
 
You can add controls and code dynamically; requires perseverence (debugging
is much more difficult)!

Consider having ALL your controls on the form (with associated) code on the
form at the outset. Set the visible property of the controls (you might have
wanted to add) to FALSE initially and set the property to TRUE when you might
have added them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top