ScreenRefresh Method

Applies To

Application object.

Description

Updates the display on the monitor with the current information in the video memory buffer. You can use this method after using the ScreenUpdating property to disable screen updates.

Syntax

expression.ScreenRefresh

expression Required. An expression that returns an Application object.

Remarks

ScreenRefresh turns on screen updating for just one instruction and then immediately turns it off. Subsequent instructions don't update the screen until screen updating is turned on again with the ScreenUpdating property.

On the Macintosh, document windows are hidden when screen updating is turned off. The ScreenRefresh method displays updated document windows for an instant, but then they're hidden again. Therefore, on the Macintosh, you may want to use the ScreenUpdating property instead of the ScreenRefresh method to turn screen updating on and off.

See Also

ScreenUpdating property.

Example

This example turns off screen updating, opens Test.doc, inserts text, refreshes the screen, and then closes the document (with changes saved).

ScreenUpdating = False
Documents.Open FileName:="C:\Docs\Test.doc"
Set myRange = ActiveDocument.Range(Start:=0, End:=0)
myRange.InsertBefore "new"
Application.ScreenRefresh
ActiveDocument.Close SaveChanges:=wdSaveChanges
ScreenUpdating = True