From the course: Excel VBA: Managing Files and Data

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Add an option button to a UserForm

Add an option button to a UserForm

- [Instructor] It's good to give people options, especially if those options can be selected with a single mouse click. In this movie, I will show you how to use option buttons and check boxes. My sample file is 06_05_OptionsAndChecks and you can find it in the Chapter 6 folder of the Exercise Files collection. I won't use any of the data in this workbook on sheet one. Instead, I will shift to the Visual Basic Editor by pressing alt F11. And here I have a user form and I will increase the size of the Canvas. To add an option button, you go to the toolbox and then click the option button icon. If you don't see the toolbox, for example, if it's hidden, then you can either click the toolbox button on the toolbar or go to the View menu and click toolbox. So there it is, and I'll drag it over to here. The option button is here. Looks like a target, and I will drag the button onto the body of the user form, and there's the button and the caption, which is displayed next to it, is…

Contents