ScreenUpdating Property

Microsoft Publisher Visual Basic

expression.ScreenUpdating

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

Remarks

Turning screen updating off during run time can speed execution of Visual Basic code. However, it is recommended to provide some indication of status so that the user is aware that the program is functioning correctly.

Example

The following example turns off screen updating at the beginning of a subroutine and turns it back on at the end of the subroutine.

Sub TurnOffScreenUpdating()
    ScreenUpdating = False

    ' Execute code here.

    ScreenUpdating = True
End Sub