Design A VBA User Form - MultiPage Controls, Labels, Textboxes
Design A VBA User Form - MultiPage Controls, Labels, Textboxes
http://www.homeandlearn.org/designing_the_user_form.html
1/6
4/7/2015
2/6
4/7/2015
In the properties area for the MultiPage, change the Height to 378 and the Width to 558. Set the Top
property to 10 and the Left property to 6.
By default, the MultiPage control has two pages. This is fine for us. To change the captions on the
pages, click on the first one, which has the default name Page1. (Click exactly on the text Page1.)
This will open up the properties for that page, rather than the MultiPage control as a whole. Locate the
Caption property of Page1 and change it to View Photos. Now do the same for Page2. Click on the
text Page 2 and change the Caption property to Add New Photo. The top of your form should now
look like this:
We can now add the controls to the MultiPage. The controls we want on the View Photos page are 7
Labels, 6 Textboxes, 1 ComboBox, 2 option buttons, 3 command buttons, and 1 picture frame. We'll
add the labels first.
Draw out the first label anywhere on your form. Now set the following properties for the label:
Caption: File Name
Height: 18
Width: 54
Top: 72
Left: 24
Locate the Font property and click the grey button with the three dots in it:
http://www.homeandlearn.org/designing_the_user_form.html
3/6
4/7/2015
In the properties area, locate the Left property. Type in a value of 24 and press the enter key on your
keyboard. All your labels will then left-align to the desired position.
Now set the following values for each label:
Label2
Caption: Date Taken
Width: 72
Top: 102
Label3
Caption: Information
Width: 66
http://www.homeandlearn.org/designing_the_user_form.html
4/6
4/7/2015
Top: 132
Label4
Caption: Dimensions
Width: 66
Top: 162
Label5
Caption: Image Size
Width: 54
Top: 192
Label6
Caption: Camera
Width: 54
Top: 222
Label7
Caption: Flash
Width: 54
Top: 258
5/6
4/7/2015
Top: 192
TextBox6
Name: txtCamera
Top: 222
Your form should now look like this:
In the next lesson below, you'll add the Option Buttons and the Command Buttons.
http://www.homeandlearn.org/designing_the_user_form.html
6/6