[AccessD] Make Folder Problem

MartyConnelly martyconnelly at shaw.ca
Sat Apr 29 12:45:24 CDT 2006


This little nugget may come in handy
' Does a Directory exist
' Works with or without trailing slash
Function DirExists(ByVal strDirName As String) _
 As Boolean
  On Error Resume Next
  DirExists = _
   (GetAttr(strDirName) And vbDirectory) = vbDirectory
  Err.Clear
End Function

Kaup, Chester wrote:

>When I try the following I get a runtime error 76
>
>If Not fso.folderexists(ResultsPath2) Then
>    fso.CreateFolder ("C:\Files1\Excel1\Scaleup1")
>End If
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Moss
>Sent: Friday, April 28, 2006 11:06 AM
>To: Access Developers discussion and problem solving
>Subject: Re: [AccessD] Make Folder Problem
>
>Chester,
>
>I use the fso.CreateFolder("C:\Accounts Payable\Processed") and it
>creates
>sub folders just fine.
>
>Jim
>
>  
>
>>I use the following code on my machine to create a folder and it works
>>fine. Just tried it on another users machine and got a message could
>>    
>>
>not
>  
>
>>create folder. I was able to do it manually. Any thoughts?
>>
>>
>>
>>ChDrive "C:"
>>
>>Set fso = CreateObject("Scripting.FileSystemObject")
>>
>>ResultsPath = "C:\Files\Excel\Scaleup10"
>>
>>
>>
>>If Not fso.folderexists(ResultsPath) Then
>>
>>    MkDir "C:\Files\Excel\Scaleup10"
>>
>>End If
>>
>>
>>
>>Chester Kaup
>>
>>Engineering Technician
>>
>>Kinder Morgan CO2 Company, LLP
>>
>>Office (432) 688-3797
>>
>>FAX (432) 688-3799
>>
>>
>>
>>
>>
>>No trees were killed in the sending of this message. However a large
>>number of electrons were terribly inconvenienced.
>>
>>
>>
>>--
>>AccessD mailing list
>>AccessD at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/accessd
>>Website: http://www.databaseadvisors.com
>>
>>    
>>
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list