>Ed,
>
>Thanks for the speedy update.
>
No problem. I did notice that it is not safe to assume that, if a special folder like "My Computer" or "Dial-Up Networking" is selected, a valid folder can be returned at all; in the case of "My Computer", all local resources have an entry in it's Items collection, and in the case of "Dial-Up Networking" (which should be blocked by setting BIF_RETURNONLYFSDIRS in the flags parameter, but I haven't tested this exhaustively), there is no folder at all - a Registry Hive reference exists instead. A little defensive coding would be a good idea here; the FAQ code was intended to show how to use the Shell.Application object's BrowseForObject method to return a Folder object, and how to manipulate a Folder object's Items collection.
Returning an empty string (or in my actual production implementation, a NULL, so that I can test the return with ISNULL() to trap unusable results or no selection made by the user) is probably the safest course of action, unless you want to add code to handle all the Special Folders cases.
>>You can trap it by using the following in place of the FOR EACH loop in the FAQ code: