When developing userforms, you will find that you make the same customizations to your controls over and over again. For instance, a commandbutton has a width of 72 by default when added to a userform. I typically don’t want my commandbuttons to be that big. I can draw the size I want as I add it to the form instead of just clicking to add it, but I can’t see what size it will be as I’m drawing.
You can store controls that you’ve customized right on the Control Toolbox. In this example, I make a commandbutton and set certain properties the way I want them. Then make that commandbutton available for later use. Start by making a new tab on the Control Toolbox. Right click on the existing tab and choose New Page
Next I right clicked on the new page and renamed it to Buttons. This page will hold all my custom buttons, but you are, of course, free to organize it any way you want. Next I add a commandbutton to a userform and change its properties to the way I like them. For this button I changed:
Accelorator | S |
ControlTipText | Save |
Width | 54 |
the properties set, I drag this new button from the userform on to my new page on the Control Toolbox.
To put the finishing touches on it (and so you can find it later), right click on the new icon on the Control Toolbox and customize it with a tooltip.
Now when the mouse hovers over that icon, you can see just which custom commandbutton you want.
Whenver you need a Save commandbutton, you can drag this new custom control onto yor userform. You can store custom controls for any type of control that you want. Just drag it to a userform, change its properties, and drag it back.
Excellent tip, many thanks!
Does anyone know where Excel stores this stuff so it can be backed up? I had a number of custom controls set up which I lost when my machine was rebuilt – I thought I had backed up everything required, but evidently not.