CommandButton.Caption Property (Access)
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

CommandButton.Caption Property (Access)

Gets or sets the text that appears in the control. Read/write String.

expression .Caption

expression A variable that represents a CommandButton object.

The Caption property is a string expression that can contain up to 2,048 characters.

Note Note

The text of the Caption property for a label or command button control is the hyperlink display text when the HyperlinkAddress or HyperlinkSubAddress property is set for the control.

You can use the Caption property to assign an access key to a label or command button. In the caption, include an ampersand (&) immediately preceding the character you want to use as an access key. The character will be underlined. You can press ALT plus the underlined character to move the focus to that control on a form.

Include two ampersands (&&) in the setting for a caption if you want to display an ampersand itself in the caption text. For example, to display "Save & Exit", you should type Save && Exit in the Caption property box.

© 2016 Microsoft