+ Reply to Thread
Results 1 to 5 of 5

Open Network drive without mappping the drive

  1. #1
    Registered User
    Join Date
    05-23-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    6

    Open Network drive without mappping the drive

    Hi

    I have the following code to open up a network drive and then folders and then a user can select which file he/she wants to open.
    The user must be able to select which file they want to open.

    ChDrive ("Z:")
    ChDir "\\Folder1\folder2\folder3"

    the problem is that Z: is a mapped network drive, that will be a different letter for different users and i need this to run from multiple users computers.
    Is there any way i can get this to open a network drive without mapping the drive because its obviously going to cause problems for other users.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    06-09-2011
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    194

    Re: Open Network drive without mappping the drive

    Hi aravJ,

    if you are using windows 7 you should aready see the path of the network drive in windows explorer (typically to the right of the DriveLetter. It should start with \\ .. an example could be:
    \\CompanyServer\VOL1\Shared\

    Rather than using CHDrive ("Z"), you could then use ChDrive ("\\CompanyServer\VOL1\Shared\")

    Regards

    Theo
    Remember To Do the Following....
    1. Upload sample files
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.

  3. #3
    Registered User
    Join Date
    05-23-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Open Network drive without mappping the drive

    I am using XP
    I have tried that, it does not work
    I get a "invalid procedure call argument" error
    Is there anything else i can do

  4. #4
    Forum Contributor
    Join Date
    06-09-2011
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    194

    Re: Open Network drive without mappping the drive

    Hi,

    I really should have tried it before replying to the post. CHDrive does not work with "pathes". Therfore you should use this:

    Please Login or Register  to view this content.
    Regards

    Theo

  5. #5
    Registered User
    Join Date
    05-23-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Open Network drive without mappping the drive

    Thanks,
    It works beautifully

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1