I get an Object is undefined for the if statement referencing accObj.Name
property below:
Sub OnObjectFocus(accObj)
accObj.Prefetch apAll
If accObj Is Nothing Then
Exit Sub
End If
If TypeName( accObj.EventWindow) = "Empty" Then
Exit Sub
End If
If TypeName( accObj.Name) = "Empty" Then
Exit Sub
End If
[The below line is throwing the error]
If accObj.Name Is Nothing Then
Exit Sub
End If
Logger( accObj.Name & " " & accObj.Role & "accObjRole in Focus")
...
What am I missing?
I saw the Name property as a Prooperty of the Accessible Object and if I
don't test it for nothing I can print out a bunch of lines with the
accObj.Name property displaying the appropriate strings until it blows the
print statement, invalid parm passed in the line to be printed string I
guess.
In any event, what am I doing wrong above and why is the accObj.Name, or the
Nothing? Throwing an error and why does the error message say undefined is
in column 1 of that statement? Is the If keyword used incorrectly?
Am I just missing something obvious?
Rick USA
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com