Bewerken

Delen via


SpecialEffect property

Specifies the visual appearance of an object.

Syntax

For CheckBox, OptionButton, ToggleButton: object.SpecialEffect [= fmButtonEffect ]

For other controls: object.SpecialEffect [= fmSpecialEffect ]

The SpecialEffect property syntax has these parts:

Part Description
object Required. A valid object.
fmButtonEffect Optional. The desired visual appearance for a CheckBox, OptionButton, or ToggleButton.
fmSpecialEffect Optional. The desired visual appearance of an object other than a CheckBox, OptionButton, or ToggleButton.

Settings

The settings for fmSpecialEffect are:

Constant Value Description
fmSpecialEffectFlat 0 Object appears flat, distinguished from the surrounding form by a border, a change of color, or both. Default for Image and Label, valid for all controls.
fmSpecialEffectRaised 1 Object has a highlight on the top and left and a shadow on the bottom and right. Not valid for check boxes or option buttons.
fmSpecialEffectSunken 2 Object has a shadow on the top and left and a highlight on the bottom and right. The control and its border appear to be carved into the form that contains them. Default for CheckBox and OptionButton, valid for all controls (default).
fmSpecialEffectEtched 3 Border appears to be carved around the edge of the control. Not valid for check boxes or option buttons.
fmSpecialEffectBump 6 Object has a ridge on the bottom and right and appears flat on the top and left. Not valid for check boxes or option buttons.

Remarks

For a Frame, the default value is Sunken.

Note that only Flat and Sunken (0 and 2) are acceptable values for CheckBox, OptionButton, and ToggleButton. All values listed are acceptable for other controls.

Use either the SpecialEffect or the BorderStyle property to specify the edging for a control, but not both. If you specify a nonzero value for one of these properties, the system sets the value of the other property to zero. For example, if you set SpecialEffect to fmSpecialEffectRaised, the system sets BorderStyle to zero (fmBorderStyleNone).

For a Frame, BorderStyle is ignored if SpecialEffect is fmSpecialEffectFlat. SpecialEffect uses the system colors to define its borders.

Note

Although the SpecialEffect property exists on the ToggleButton, the property is disabled. You cannot set or return a value for this property on the ToggleButton.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.