VB Code:
Private Sub Form_Load() MsgBox HasProperty(Form1, "Caption") Unload Me End Sub Public Function HasProperty(objObject As Object, strProperty As String) As Boolean Dim varRet As Variant On Error Resume Next varRet = CallByName(objObject, strProperty, VbGet) If Err.Number = 0 Then HasProperty = True End If On Error GoTo 0 End Function
![]()




Reply With Quote