'Declaration
Sub EndUpdate()
'Usage
Dim instance As IWorkbookSet instance.EndUpdate()
void EndUpdate()
'Declaration
Sub EndUpdate()
'Usage
Dim instance As IWorkbookSet instance.EndUpdate()
void EndUpdate()
This method is thread safe.
EndUpdate releases the lock which was acquired by BeginUpdate by calling GetLock.
See GetLock and ReleaseLock for more information about acquiring and releasing locks and the effect this has on background calculation.
void DoSomeThreadSafeWorkQuickly(IWorkbookSet workbookSet) { // Interrupt background calculation if necessary, acquire an // exclusive lock on the workbook set and suspend events and // painting. workbookSet.BeginUpdate(); try { // Do a lot of work... } finally { // Release the lock on the workbook set, start background // calculation if appropriate and repaint controls. workbookSet.EndUpdate(); } }
Sub DoSomeThreadSafeWorkQuickly(ByVal workbookSet As IWorkbookSet) ' Interrupt background calculation if necessary, acquire an ' exclusive lock on the workbook set and suspend events and ' painting. workbookSet.BeginUpdate() Try ' Do a lot of work... Finally ' Release the lock on the workbook set, start background ' calculation if appropriate and repaint controls. workbookSet.EndUpdate() End Try End Sub 'DoSomeThreadSafeWork
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2