One of my routines checks for all sub-folders within a main folder which works fine on XP but not Vista.

With XP GetAttr returns 16 (a folder) but with Vista it returns 8208 (?) and as a result the msgbox isn't displayed.

Is there a trick with Vista and GetAttr to return a folder?

Code:
If GetAttr(tPortSettings.sDBLocation & "Themes\" & sFileName) = vbDirectory Then
            
            MsgBox "Is Folder!
            
            End If