+ Reply to Thread
Results 1 to 7 of 7

VBA to check and see if network drive is mapped

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    VBA to check and see if network drive is mapped

    Hello again, Gurus.

    I have a macro used by several people on different computers that saves a file to our network. From time to time, for reasons unknown, some users may lose connection to the mapped network drive. I need to begin the Macro with a check to see if the drive is available to the user, and if it isn't available give a message, "The PO Tracking Drive is not available. Please contact your System Administrator.", and then end the macro.

    The network drive is \\fs950o\PO Tracking, and the drive letter is "M".

    Thanks in advance for any help you can offer.

    Hutch
    Last edited by [email protected]; 08-29-2013 at 10:03 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: VBA to check and see if network drive is mapped

    Bump, Please.

    Have a great day!

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: VBA to check and see if network drive is mapped

    No luck with this one? I would have thought there was a way to check to confirm if a network drive is mapped via VBA.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA to check and see if network drive is mapped

    Have you tried simply using Dir?
    Remember what the dormouse said
    Feed your head

  5. #5
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: VBA to check and see if network drive is mapped

    Thanks for the reply, Rory.

    No, sir. I haven't tried using Dir. Sorry to say I don't know how. I have already searched the forum for "how to detect if a network drive is mapped", and found nothing that seemed to fit my needs. Do you think I would have better luck if I searched, "Using Dir to detect a network drive"?

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA to check and see if network drive is mapped

    You could probably also use ChDrive with an error trap:
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: VBA to check and see if network drive is mapped

    That appears to work perfectly, Rory. Thank you so much. This thread will be marked as CLOSED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Drive Letter Property not returning mapped drive letter
    By Mike_bee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2013, 02:45 PM
  2. Save files to a Mapped Network Drive on server
    By wotsup in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2012, 11:46 AM
  3. Replies: 0
    Last Post: 10-07-2010, 10:37 AM
  4. ODBC from not mapped Drive
    By iancallaghan87 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-14-2007, 10:53 AM
  5. Replies: 1
    Last Post: 10-17-2005, 01:05 PM

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