Microsoft Office Tutorials and References
In Depth Information
Displaying, loading, and hiding UserForms
In this exercise, you’ll create a UserForm, add a text box, add a list box, and then add a
series of option buttons within a single group. You’ll also add spin button controls to two
text boxes, and use existing code to display the form and write its data to a worksheet.
SET UP You need the PackageWeight workbook located in the Chapter12 practice file
folder to complete this exercise. Open the workbook, click the Enable Content button
on the Message Bar (if necessary), and then follow the steps.
1
Press Alt+F11 to open the Visual Basic Editor.
2
On the menu bar, click Insert , and then click UserForm to create a blank UserForm.
3
In the Toolbox , click the Label button and draw a label in the upper-left corner of
the UserForm. Then, with the label still selected, in the Caption property box of the
Properties panel, enter Pounds .
4
Click on the body of the UserForm and then, in the Toolbox , click the Label button
and draw a label to the right of the Pounds label. Then, with the label still selected,
in the Caption property box of the Properties panel, enter Ounces . Resize the label
control so that the Ounces text its within it.
5
Click on the body of the UserForm and then, in the Toolbox , click the Tex tBox
button. Draw a text box below the Pounds label on the UserForm. Click the Tex tBox
button again and, leaving some space for another control, draw a second text box below
the Ounces label.
12
6
In the Toolbox , click the SpinButton button and then draw a spin button to the right
of the text box beside the Pounds label.
 
Search JabSto ::




Custom Search