Burkhard

I had to remove some parts of your original code. "typeFolderLevel" appears to be a user defined type and "LoadArrayOfFoldersAndSubfolders" appears to be a sub defined some place else.

But with those lines removed the remaining code seems to work fine. Both in the debugger and when run "free". Running it on my Inbox, I get the same "MySelection.Count(A): XX" output in both cases.