AutoRepeat Property

Applies To

Command Button control.

Description

You can use the AutoRepeat property to specify whether an event procedure or macro runs repeatedly while a command button on a form remains pressed in.

Setting

The AutoRepeat property uses the following settings.

Setting

Description

Visual Basic

Yes

The macro or event procedure in the Click event runs repeatedly while the command button remains pressed in.

True (–1)

No

(Default) The macro or event procedure runs once.

False (0)


You can set this property by using the command button's property sheet, a macro, or Visual Basic.

Remarks

The initial repeat of the event procedure or macro occurs 0.5 second after it first runs. Subsequent repeats occur either 0.25 second apart or the duration of the event procedure or macro, whichever is longer.

If the code attached to the command button causes the current record to change, the AutoRepeat property has no effect.

If the code attached to the command button causes changes to another control on a form, use the DoEvents function to ensure proper screen updating.

See Also

DoEvents function.