Handling Trappable Errors from OLE Servers


When programming with OLE objects, you can receive trappable errors from three sources:

There are two programming strategies for trapping these errors, as follows:

Polling is essential when programming with OLE objects. Errors from OLE object's applications tend to be vague - Excel defines seven errors to cover about 1400 methods and properties. You usually need to know exactly what line of code failed to handle the situation effectively.