'On Error' statements are not valid within 'SyncLock' statements
On Error statements are cannot be used in SyncLock blocks because they would disrupt thread synchronization.
Error ID: BC30752
To correct this error
- Place On Error statements outside SyncLock blocks.