Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Oct 2005
    Location
    Cambridgeshire, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to map a drive (2003)

    Hello,

    I need to map a network drive and I was wondering if there was a way to do it via excel or not. Basically, they will be selecting drive J and folder testsrv01groupstimesheets. Any help would be great.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to map a drive (2003)

    This is not really an Excel question, so this thread has been moved to the VB/VBA forum.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to map a drive (2003)

    For example:

    CreateObject("WScript.Network").MapNetworkDrive "J:", "testsrv01groupstimesheets"

    (Are you sure about that path? There should only be a double backslash at the beginning)

  4. #4
    2 Star Lounger
    Join Date
    Oct 2005
    Location
    Cambridgeshire, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to map a drive (2003)

    Hans,
    Can you tell me via which program I can do this? I would like to do it in an excel file or word. By the way, you are correct about the //.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to map a drive (2003)

    The line I posted can be used in a macro in any of the Office applications - Word, Excel, PowerPoint, Access, Outlook.

  6. #6
    2 Star Lounger
    Join Date
    Oct 2005
    Location
    Cambridgeshire, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to map a drive (2003)

    Ok.

  7. #7
    2 Star Lounger
    Join Date
    Oct 2005
    Location
    Cambridgeshire, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to map a drive (2003)

    Hans,

    Is there a way to add to the macro a command to put a desktop shortcut for the created map drive J?

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to map a drive (2003)

    Also asked (and answered) in <post:=582,014>post 582,014</post:>. This thread is locked to avoid duplication.

Posting Permissions

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