Share via


RequiredControl Property [Publisher 2003 VBA Language Reference]

MsoTriState

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse Indicates entry into the specified Web text box control is not required.
msoTriStateMixed
msoTriStateToggle
msoTrue Indicates entry into the specified Web text box control is required.

expression.RequiredControl

expression Required. An expression that returns one of the objects in the Applies To list.

Example

This example creates a new Web text box control in the active publication, sets the default text and the character limit for the text box, and specifies that an entry is required.

Sub AddWebTextBoxControl()
    With ActiveDocument.Pages(1).Shapes.AddWebControl _
            (Type:=pbWebControlMultiLineTextBox, Left:=72, _
            Top:=72, Width:=300, Height:=100).WebTextBox
        .DefaultText = "Please enter text here."
        .Limit = 200
        .RequiredControl = msoTrue
    End With
End Sub

Applies to | WebTextBox Object