Adding controls

Oddly enough, the VBE doesn't have menu commands that let you add controls to a dialog box. You must use the Toolbox, which I describe in the preceding chapter, to add controls. Normally, the Toolbox pops up automatically when you activate a UserForm in the VBE. If it doesn't, you can display the Toolbox by choosing ViewOToolbox.

Follow along to add a control to the UserForm:

1. Click the Toolbox tool that corresponds to the control you want to add.

2. Click in the UserForm.

3. Drag the control into position.

Alternatively, you can simply drag a control from the Toolbox to the UserForm to create a control with the default dimensions. Figure 17-1 shows a UserForm that contains a few controls.

1. Choose ToolsOOptions in the VBE.

2. In the Options dialog box, select the General tab.

3. Set your desired options in the Form Grid Settings section.

0 0

Post a comment