MS-Excel / General Formatting

Common Control Attributes

Before getting to the specific control types, let's take a second to run through the a few attributes that are common to all or more of the controls:

id
A unique string identifier for a custom control.

idMso
A unique string identifier for a built-in control.
Tip: To get the name of a built-in control, you can use the Lists of Controls Ids worksheets that I mentioned earlier. Alternatively, right-click the Quick Access toolbar and then click Customize Quick Access Toolbar.Use the Choose Commands From list to display the category of the command that corresponds to the control you want to work with and then hover the mouse pointer over the command. In the banner text that pops up, the command name appears in parentheses.

label
The text that appears on the control.

imageMso

A string that represents the name of an icon associated with a built-in control. This icon appears with your control.
Tip: The imageMso attribute refers to the icons you see with all the controls on all the Office 2007 application Ribbons and commands.Office 2007 has hundreds of these icons, and you can use any of them in your custom interface.The only problem is finding out the name of a particular icon so that you can use it as the imageMso value.There is no easy way to determine this, but the following link takes you to an Excel workbook that contains several galleries that display all the Office 2007 icons:
http://www.sunflowerhead.com/msimages/Office2007IconsGallery.zip
Pull down a gallery and hover the mouse pointer over an icon to see the icon's name.

size
The relative size that you want to use for the control. Use either normal or large.

InsertAfterMso
The string identifier of the built-in control after which you want your control inserted.

InsertBeforeMsoID
The string identifier of the built-in control before which you want your control inserted.

onAction
A string that specifies the macro to run when the control is clicked. Use the form Module.Macro, where Module is the name of the module that holds the procedure and Macro is the name of the procedure.

enabled
Set to false to disable the control; set to true to enable the control.

visible
Set to false to hide the control; set to true to display the control.

screentip
The title of the SuperTip banner that appears when the user hovers the mouse pointer over the control. If SuperTips are turned off, the user sees just this text.

supertip
The text that appears in the SuperTip banner when the user hovers the mouse pointer over the control. Use this text to explain what the control does.

keytip
The character or characters that appear when the user presses Alt. The user can then press the character or characters to choose the control via the keyboard. Enter up to three alphanumeric characters.
[Contents] [Next]