NAB and aclentry name comparing

I am obtaining a user full name from public address book and then comparing a name from a mailbox acl to see if it is same. But I am struggling as the comparison does not work. Code is along these lines:

Dim resourceNotesName As New NotesName(doc.FullName(0))

Dim aclentry As NotesACLEntry

Set aclentry = acl.GetFirstEntry

if resourceNotesName = Lcase(aclentry.Name) then

Subject: NAB and aclentry name comparing

The code was in 2 routines and the first variable was not declared in 2nd routine. I got around this by declaring it globally.

Thanks.

Subject: NAB and aclentry name comparing

Did you try with debug. For one I see you are comparing the nab fullname(0) with the lowercase of the acl.

Either debug or put a message box in the code that would display both values.