Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Unanswered: VBA code to share a folder for multiple users

    I am writing a procedure that autoinstalls msde
    then loads a db that attaches the database to the sql server
    then creates a file dsn on the machine to link to the tables
    then truncates off the dbo_

    Everything works but my problem is that I need to share that folder that has the mdf file so when the code runs on a worstation that dsn created locally can access (no pun intended) the file

    anyone have a code snippett to change the a folder to shareable? I have looked for API and through various filesystem objects but can't seem to get it.

    Got one of those Geo or PK
    Dale Houston, TX

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Good question Dale. I did some searching to modify permissions for users folders. The code snippet I have in the code bank for Active Directory might get you started for tapping into the Active Directory but if you can expand on it and perhaps find a way to change user permissions to a folder, PLEASE upload it. I was not able to find any code to do this and this would come in handy for me also.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    I wonder if the permissions is different then just first creating a share (properties/ sharing tab)

    I am going to research this

    if i get a solution I will post
    Dale Houston, TX

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    My instinct says to start your search for VBScripts over VBA solutions. VBS files are able to manipulate the FSO much easier!

    A quick google throws up the following file - click! which may help you with the theory.

    I'd love to spend more time looking at this problem (it's an interesting one, that's for sure!) but I have to sleep at some point

    Good luck Dale, let us know of any progress you make
    George
    Home | Blog

Posting Permissions

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