FileSystemObject folderexists with mapped drives VB6

Public Function CheckFolderExists(OrigFile As String)
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
FolderExists = fs.FolderExists(OrigFile)
End Function
which returns the correct result for a local drive but not for a mapped drive.

The problem appears to be Vista specific, as it works fine on XP machines.
If you are not using Vista then you will be unable to replicate the problem. That is what I have worked out over the past hour!

>I get a runtime error 438 - item dosen't support this property or method in the
>fs = CreateObject("Scripting.FileSystemObject")
>line
This is'n used anymore in the code I gave you! I used the PathFileExists function declared in shlwapi.dll. The error must be somewhere else! Forget about the regsvr32 procedure and try again this code:

Featured Post

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Introduction
While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library. This article will introduce you to the SC library a…

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…

As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…

Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…