Results 1 to 5 of 5
  1. #1
    tgall is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Location
    na
    Posts
    38

    VBA code to create a folder on a shared drive.

    Direct Path: Is there a neat piece of VBA that creates a folder on a shared drive?

    Scenic View: I'm building a form for a Lab Coordinator (LC). To control process
    and ensure consistent naming and location, I'm writing code to automate as much
    as possible. The form gathers data about a project and allows the LC to assign


    Technicians and lab resources to the project. One of the "resources" is the file
    folders on the shared drives. When the LC sets Status to Ready to Test, the VBA code:
    1 checks that mandatory fields are correctly filled in
    2 if yes, then builds data entry forms
    3 AND, is supposed to build the folders for analyses and reports

    #1 and #2 were a breeze to build. #3 is kicking my ya-ya.

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    although for excel, this link provides the code require - should work in access

    note the requirement to include Microsoft scripting runtime in your references

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    This is simple with a network server and MkDir command. Don't know anything about 'shared' drives. Bing search did not find much. This link looked promising but doesn't seem to actually create folder http://www.vbforums.com/showthread.p...re-permissions

    Ajax, not seeing link in your post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    tgall is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Location
    na
    Posts
    38
    Ajax, many thanks! I had found http://www.vbforums.com/showthread.p...r-using-Access,
    but I vinyl-skipped checking the reference library. Once I activated the library was active, the coding I had written worked.

    June7, thank you! ;-)

  5. #5
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    my bad - forgot the link!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Shared Drive Access Issue
    By Classic in forum Access
    Replies: 6
    Last Post: 09-23-2014, 06:03 AM
  2. Shared drive path to save attachments
    By zaffar_mughal in forum Access
    Replies: 3
    Last Post: 08-27-2014, 10:43 PM
  3. Replies: 2
    Last Post: 09-04-2013, 11:01 PM
  4. shared DB on local drive
    By mike02 in forum Access
    Replies: 1
    Last Post: 05-20-2013, 01:54 PM
  5. Multi Users on shared drive
    By wallen in forum Access
    Replies: 0
    Last Post: 08-25-2008, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums