Text Property
Applies To
Balloon object, BalloonCheckbox object, BalloonLabel object, CommandBarComboBox object, FileFind object.
Description
CommandBarComboBox object: Returns or sets the text in the display or edit portion of the command bar combo box control. Read/write String.
BalloonLabel or BalloonCheckbox object: Returns or sets the text displayed next to the specified check box or label in the Office Assistant balloon. Read/write String.
Balloon object: Returns or sets the text displayed after the heading but before the labels or check boxes in the Office Assistant balloon. Read/write String.
FileFind object: Returns or sets the string to look for, up to 80 characters, in a the body of a document during a file search. Macintosh only. Read/write String.
Remarks
For the Balloon, BalloonLabel, and BalloonCheckbox objects, you can specify a graphic to display by using the following syntax: {type location sizing_factor}, where type is bmp (bitmap), wmf (Windows metafile), or pict (Macintosh PICT file); location is the resource id or the path and file name; and sizing_factor specifies the width of the wmf or pict (omitted for bmp).
See Also
Heading property, Show method.
Example
This example checks the number of items in the combo box control on the command bar named "Custom." If there are more than three items in the list, the example clears the list and adds a new first item to it. The new default item for this control is "Floyd."
Set myBar = CommandBars("Custom")
Set myControl = myBar.Controls(2)
With myControl
If .ListCount > 3 Then
.Clear
.AddItem "Floyd", 1
.Text = "Floyd"
End If
End With
This example creates a new Office Assistant balloon with a heading, text, and three region choices. The example uses the Text property to provide a label for each check box.
With Assistant.NewBalloon
.Heading = "Regional Sales Data"
.Text = "Select a region"
For i = 1 To 3
.CheckBoxes(i).Text = "Region " & i
Next
.Show
End With
This example creates a new Office Assistant balloon with a heading, text, and three region choices. The example uses the Text property to provide balloon-related instructions to the user.
With Assistant.NewBalloon
.Heading = "Regional Sales Data"
.Text = "Select a region"
For i = 1 To 3
.CheckBoxes(i).Text = "Region " & i
Next
.Show
End With