Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,807
- Office Version
- 2016
- Platform
- Windows
Hi all,
As you know, the TypeOf operator cheks if an object implements a certain interface so the following 2 codes return TRUE as expected :
in a userform module:
The same goes for this :
However when we apply this to the Application object, the return is False despite the fact that the Application object does also implement the IAccessible interface !
Any ideas why this is the case ?
As you know, the TypeOf operator cheks if an object implements a certain interface so the following 2 codes return TRUE as expected :
in a userform module:
Code:
Private Sub UserForm_Click()
MsgBox TypeOf Me Is IAccessible
End Sub
The same goes for this :
Code:
Private Sub Test1()
MsgBox TypeOf Application.CommandBars(1) Is IAccessible
End Sub
However when we apply this to the Application object, the return is False despite the fact that the Application object does also implement the IAccessible interface !
Code:
Private Sub Test2()
MsgBox TypeOf Application Is IAccessible
End Sub
Any ideas why this is the case ?