Lect 7
Lect 7
3
These are Option Buttons
4
ii) add controls to the user form
- from the toolbox drag and drop the icon of a particular control
to the UserForm
- move and resize the control
8
The properties windows for a Combobox and a Textbox looks like this:
iv) check and modify the tab order
- the tab order is the sequence in which the controls receive
the focus
- inside the VBA editor select View TabOrder
a window displaying the controls in a particular order opens
- with “Move up“ or “Move down“ you can change this order
Once you have created the Userform with all the desired
controls and written the code, you can run it as for any
other subroutine
11
- open a user form
- add a label with text “What is your answer?“
- add three OptionButtons with specified test
- change the caption in the UserForm Properties Window to
“Yes or No“
-view the code of the UserForm (by clicking on the form), it
will say
- Private Sub UserForm_Click()
End Sub