Results 1 to 5 of 5

Thread: Create New Folder?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263

    Question

    Is it possible to write code to create a folder. What I want to do is if this folder does not exist, create the folder and save the file. How can I do this?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    Take a look at the FileSystemObject.
    Damonous

  3. #3
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Try the MkDir procedure.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    How do I do that? I am a beginner. Also, keep in mind I am using VBA. Please help
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    Code:
    Private Sub Form_Load()
    
    'check to see if a dir exists
    
    Dim sDir As String
    sDir = "C:\my documents\helpmeout"
    
      If Dir(sDir, vbDirectory) <> "" Then
        MsgBox "Exist"
      Else
        ChDir "C:\my documents"
        MkDir (sDir)
        'then do your save or whatever
      End If
    
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width