UpdateChanges Method

Microsoft Excel Visual Basic

Show All Show All

UpdateChanges Method

Updates the list on a Microsoft Windows SharePoint Services site with the changes made to the list in the worksheet. Returns Nothing.

expression .UpdateChanges(iConflictType)

expression    Required. An expression that returns a ListObject object.

iConflictType   Optional XlListConflict. Conflict resolution options.

XlListConflict can be one of these XlListConflict constants.
xlListConflictDialog default
xlListConflictRetryAllConflicts
xlListConflictDiscardAllConflicts
xlListConflictError

Remarks

This method applies only to lists linked to a SharePoint site. If the SharePoint site is not available, an error is generated.

Example

The following sample updates the list on the SharePoint site with any changes made to the default list in Sheet1 of the active workbook. The sample requires a list in the active workbook that is connected to a SharePoint site.

    Sub UpdateListChanges()
   Dim wrksht As Worksheet
   Dim objListObj As ListObject
   
   Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
   Set objListObj = wrksht.ListObjects(1)
         
   objListObj.UpdateChanges xlListConflictDialog
End Sub