Microsoft Office Tutorials and References
In Depth Information
Creating UserForm Templates
Figure 13-15: The Additional Controls dialog box lets you add other ActiveX controls.
Not all ActiveX controls that are installed on your system will work in Excel UserForms.
In fact, most of them probably won’t work. Also, some controls require a license in
order to use them in an application. If you (or the users of your application) aren’t
licensed to use a particular control, an error will occur.
Creating UserForm Templates
You may find that when you design a new UserForm, you tend to add the same controls each
time. For example, every UserForm might have two CommandButtons that serve as OK and
Cancel buttons. In the previous section, I describe how to create a new control that combines
these two (customized) buttons into a single control. Another option is to create your UserForm
template and then export it so that you can import it into other projects. An advantage is that the
event-handler code for the controls is stored with the template.
Start by creating a UserForm that contains all the controls and customizations that you’d need to
reuse in other projects. Then make sure that the UserForm is selected and choose File Export
File (or press Ctrl+E). You’ll be prompted for a filename.
Then, when you start your next project, choose File Import File to load the saved UserForm.
 
Search JabSto ::




Custom Search