Adding the CommandButtons. Microsoft Excel VBA Programming
PDF
Document
Advertisement
Advertisement
Chapter 16: UserForm Basics
261
Adding the CommandButtons
Ready to add two CommandButtons — OK and Cancel — to the dialog box?
Follow along:
1. Make sure that the Toolbox is displayed. If it isn’t, choose
View➪Toolbox.
2. If the Properties window isn’t visible, press F4 to display it.
3. In the Toolbox, drag a CommandButton into the dialog box to create a button.
As you see in the Properties box, the button has a default name and caption: CommandButton1.
4. Make sure that the CommandButton is selected. Then activate the
Properties window and change the following properties:
5. Add a second CommandButton object to the UserForm and change the following properties:
6. Adjust the size and position of the controls so your dialog box looks something like Figure 16-4.
Figure 16-4:
The
UserForm with two
Command
Button controls.
/
Download
Just a friendly reminder. You can view the document right here. But most importantly, our AI has already read it. It can explain complex things in simple terms, answer your questions in any language, and help you quickly navigate even the longest or most compilcated documents.
Advertisement