+ Reply to Thread
Results 1 to 2 of 2

Saving a workbook to a shared drive

  1. #1
    Registered User
    Join Date
    06-10-2014
    Posts
    15

    Saving a workbook to a shared drive

    Hello,

    I am hoping to have one of my userforms save a document to a shared drive called "Production". Here is my code as of right now:

    dim today as string
    Workbooks.add
    today = Date
    ActiveWorkbook.SaveAs "Q://Manufacturing/Preliminary" & today

    My issue is that this is a shared workbook, so many people will be using this macro on many computers different, and not everyone has assigned the "Production" drive to the same letter, e.g. for some people it is Q drive for other people it is P drive or S drive or whatever. Is there any trick out there to working around this?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,482

    Re: Saving a workbook to a shared drive

    Try something like:

    Please Login or Register  to view this content.
    and then:

    Please Login or Register  to view this content.
    I suspect that you might need to format the date to remove forward slashes.


    The drive letter will depend on how many shared folders each user has and the order they are allocated in the profile/login script. Ideally, shared drives should have a fixed drive letter rather than just allocating the next available drive letter. However, that approach has to be limited otherwise you could run out of drive letters.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Shared workbook on a share drive
    By runner in forum Excel General
    Replies: 1
    Last Post: 10-27-2012, 08:39 AM
  2. Saving on shared drive with macro throwing errors once in awhile
    By siray13 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-06-2012, 09:01 AM
  3. Auto Saving a file in a macro to a shared drive
    By Slobey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2008, 02:01 AM
  4. [SOLVED] Interactive Workbook on Shared Drive
    By J.W. Aldridge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2006, 10:25 AM
  5. [SOLVED] Problems Saving on a shared drive
    By Anthony in forum Excel General
    Replies: 0
    Last Post: 03-20-2005, 07:06 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