UserForm Basics #1

Here, you’ll learn to make a UserForm, add a button, and make clicking on that button hide the UserForm!

Make a UserForm:

  1. Press Alt-F11 to bring up Visual Basics menu
  2. Click the drop down menu in the upper left hand and select UserForm:Screen Shot 02-10-16 at 11.46 PM
  3. Press F4 to bring up the properties menu. Use this box to change the userform’s name:Screen Shot 02-10-16 at 11.56 PM
  4. Next, use the “Caption” field to change the UserForm’s caption:Screen Shot 02-11-16 at 12.02 AM


Add a Button:

  1. Using the Toolbox Controls, add a Command Button:Screen Shot 02-11-16 at 12.05 AM
  2. In the UserForm area, single click to create a standard size button, or click and drag to create the button size you want:Screen Shot 02-11-16 at 12.15 AM
  3. Click on the button’s text to edit it’s display text:Screen Shot 02-11-16 at 12.16 AM
  4. Using the properties menu on the left, you can change the button’s color, font, and other properties!

Hiding the UserForm when the button’s pressed!

  1. Double-click on your Command Button (or whatever you’ve named it in the properties menu), to bring up the event script menu.
  2. Use the command “.Hide” as shown in the picture below. In this example, the UserForm’s name was HideForm, thus the script line is “HideForm.Hide”:
  3. [snippet id=”50″]

Check out the video below for more details!



[frontpage_news widget=”14410″ name=”You Might Also Like”]


You Might Also Like

Create Sheets For Each User From Column A

Create Sheets For Each User From Column A

Sometimes in Excel, we need to automate simple tasks, like to create sheets automatically for each item in a range. If you just had a few worksheet tabs that needed to be created, it wouldn't be a big deal, but what if you had to create 100 different worksheet tabs?!...

How To Add A Date Picker Calendar in Excel VBA

How To Add A Date Picker Calendar in Excel VBA

Date Picker Calendar in Excel VBA Oftentimes, users want to click a button and select a date. This is no different for Excel developers. Check out this ActiveX control by Microsoft that allows users to do just that. It's a little old school looking, but actually has...


Forgot Password?

Join Us

Discover the Secrets of Excel Your Coworkers Don't Want You To Know and Your Boss Will Love You For...

Free video training will be sent to your email

You have Successfully Subscribed!

    Your Cart
    Your cart is emptyReturn to Shop