Share via


Workbook.Sync Event

Excel Developer Reference

Occurs when the local copy of a worksheet that is part of a Document Workspace is synchronized with the copy on the server.

Syntax

expression.Sync(SyncEventType)

expression   An expression that returns a Workbook object.

Parameters

Name Required/Optional Data Type Description
SyncEventType Required MsoSyncEventType The status of the worksheet synchronization.

Example

The following example displays a message if the synchronization of a worksheet in a Document Workspace fails.

Visual Basic for Applications
  Private Sub Worksheet_Sync(ByVal SyncEventType As Office.MsoSyncEventType)
If SyncEventType = msoSyncEventDownloadFailed Or _
        SyncEventType = msoSyncEventUploadFailed Then
        
    MsgBox "Document synchronization failed.  " & _
        "Please contact your administrator " & vbCrLf & _
        "or try again later."

End If

End Sub

See Also