Error not suppressed?

geoB

Registered User.
Local time
Today, 12:52
Joined
Oct 10, 2008
Messages
68
I've borrowed some code from lala posted recently to enumerate the rowsources in table fields. The piece I've got:
Code:
Public Function HasProperty(obj As Object) As Boolean
   'Purpose: Return true if the object has the property.
   Dim varDummy As Variant
   On Error Resume Next
   varDummy = obj.Properties("rowsource")
   HasProperty = (Err.number = 0)
End Function
still hangs with a "Property not found" error message at the varDummy line. Which I expected the On Error line to avoid.

Clearly I'm missing something! But what?

Thanks.

George
 
In the VB IDE, open menu: Options | General | Error Trapping
You probably have selected: "Break on all errors". When you should be selecting
"Break on unhandled errors."

HTH:D
 
Guus: Probability = 1.

Thanks immensely.

gwb
 

Users who are viewing this thread

Back
Top Bottom