Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Worksheet Controls > Control Toolbox Toolbar< Previous | Next > 

 

Step 1 - Understand the Controls

 
 

These controls are all ActiveX controls and will require you to add some VBA code to the necessary events.

 
   

 

 Design Mode - Switches to forms design mode, where you can edit or create a form by using the ActiveX tools on the Control Toolbox.

 
 

 Properties - For web controls, changes the properties of those controls in the file. For form fields, changes options for the selected form fields.

 
 

 View Code - Displays the Visual Basic Editor, where you can write Visual Basic commands.

 
 

 Check Box - Allows the user to either select or deselect an option.

 
 

 Text Box - Allows you to display text and to allow the user to enter information.

 
 

 Command Button - Allows the user to perform a specific action and will run a separate subroutine.

 
 

 Option Button - Allows the user to select from a list of possible choices.

 
 

 List Box - Allows the user to select from a list of possible choices.

 
 

 Combo Box - Allows the user to either select an item from the drop-down list or to enter a different value into the text box.

 
 

 Toggle Button - Allows the user to toggle between two states.

 
 

 Spin Button - Allows the user to select a value by clicking on two buttons either to increase or decrease the value.

 
 

 Scroll Bar - Allows the user to drag a button to change a value.

 
 

 Label - Allows you to display text to the user.

 
 

 Image - Allows you to display a graphic or picture.

 
 

 More Controls - Lets you add additional controls to your document.

 

 

Step 2 - Design Mode and Run Mode

 
 

There are actually two modes available, "Design Mode" and "Run Mode". The controls can only be moved, resized or deleted when in Design Mode.

 
 

As soon as you select a control from the toolbar you will be automatically placed in Design Mode.

 
 

This button changes to Exit Design Mode while you are in forms design mode.

 
   
 

Design mode allow you to work with the control without actually firing any events.

 
 

Every time you select a control with your mouse it assumes that you want to use the control.

 
 

This is the mode that allows you to change the size and location of your controls.

 
 

When you add a control to a worksheet it actually sits in the drawing layer (as opposed to the Value or Formula layer).

 
 

Every time you select a control the corresponding events will fire and any code associated with it will run.

 
 

To trap any of the events the necessary Event Procedure must be placed in the Worksheet Code Module and not in a general Code module.

 
 

To add an Event to one of these controls, just double click the control while in Design mode.

 
 

You can add a different event by using the procedure drop-down box in the top right of the Code window

 

 

Step 3 - Adding More Controls

 

   


 

Step 4 - Things to Remember

 
 
  • The following controls cannot be added to a worksheet, Tab Control, Multi Page, RefEdit.

     
     
  • You can size controls automatically to fit cells by holding down the Alt key as you adjust the size.

     
     
  • You cannot add these controls to a Chart Sheet.

     

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >