CB.CheckDataND Example 2

This example runs CB.CheckDataND, checks for errors, and displays a message if one occurs. Any following code runs if the error check is successful.

Sub ErrorHandling()

  ' Check the data

CB.CheckDataND

' Check if CheckDataND failed

If CB.MacroResult <> 0 Then

' Notify user or log error

MsgBox CB.MacroResultDetail.Msg

Exit Sub

End If

' Insert code that expects CheckDataND to have completed

End Sub