Archive for the ‘Controls’ Category.

Challenge: Changing font of a forms checkbox

Hi All,
For over a decade we’ve been telling people you cannot change the font of a checkbox from the forms toolbar in Excel.
Well, look at this picture:

and tell me how I got check box 2 looking the way it does (File is showing in Excel 2003).
What’s in it for you? Well, eternal fame I guess [...]

Handling Worksheet control events using a class module

Hi everyone.
When utilising controls from the Control Toolbox on worksheets, often one needs to use event code to handle the actions a user takes with them.
If however a large number of controls is used, this may become unwieldy because one has to add an event sub for each one of them. This article gives an [...]

Linking Shapes to Cells

You can show the contents of a cell inside a shape. Whether it be the caption of a commandbutton from the Forms toolbar or a rectangle from the Drawing toolbar, a simple formula will do the job. Just select the shape and type the formula in the formula bar.
This example shows both [...]

Controls: Snap To Grid

When placing ActiveX or Forms controls on a worksheet, aligning them can be a chore. Hold down the Alt key while you’re moving the controls and they will align to the cell borders, making the job much easier.

Controls: ActiveX vs. Forms

There are two kinds of controls that you can put on a worksheet, ActiveX controls from the Control Toolbox and Forms controls from the Forms (or Drawing) toolbar. Kevin, like others before him, asks how to decide which ones to use. I don’t know, but I’ll tell you how I decide.
In general, the [...]

Grouping Option Buttons

There are two kinds of option buttons that you can put on a worksheet, ActiveX options buttons and Forms toolbar option buttons. The technique to group them so that certain option buttons act as a unit is different depending on the type used.
ActiveX
Option buttons from the Control Toolbox have a GroupName property which determines [...]

Working in RefEdit Controls

RefEdit controls are used throughout Excel to allow you to select a range from a dialog or box, or just type the range in. You’ve certainly used them even if you didn’t know what they were called.
RefEdit controls have an enter mode and an edit mode. In enter mode, the arrow keys select [...]