Article ID: 129867
Article Last Modified on 12/9/2003
Dim ft As Object
Dim ct As ControlTemplate
Dim oprop As Property
' VBInstance is instance passed to add-in
Set ft = VBInstance.Application.ActiveProject.ActiveForm
' Select first control on the form:
Set ct = ft.ControlTemplates.Item(0)
' Generates Type Mismatch error when oprop is of type Property.
For Each oprop In ct.Properties
Debug.print oprop.Name
Next
The Property object is defined both in the DAO and the VBIDE object
libraries. If DAO appears ahead of VBIDE in the reference list, a "Type
Mismatch" error is generated at the For statement. This occurs because
VBIDE's Property object that is actually being used is shadowed by DAO's
Property object.Additional query words: 4.00 vb4win vb4all
Keywords: KB129867