Consulting

Results 1 to 4 of 4

Thread: saving spreadheet to network drive

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Contributor
    Joined
    Jul 2011
    Location
    Manchester
    Posts
    142
    Location

    saving spreadheet to network drive

    Fairly limited knowledge so apologies for asking what is likely a simple question!

    I have a spreadsheet used by up to 10 people at once which uses a button to save a copy of itself using certain cells completed by the user on the main page which works on my machine at work and saves to correct folder.

    However; it only works for me. When anyone else uses it it creates the correct filename but saves it to My Documents on their own pc rather than the network drive which could result in data loss.

    How can i make the file save to a default location, given that the network drive on some users PC is mapped at T: and others as R:

    e.g. my pc would be

    T:MPC\Teams\prep\pcdl\scanning\appscanning\july\current letters

    a colleagues would be

    R:MPC\Teams\prep\pcdl\scanning\appscanning\july\current letters

    Even though they are same drives

    The code i use is

    [VBA]Sub SvMe()
    Dim newFile As String
    Dim fName As String
    fName = Range("C5").Value & " " & Range("C3").Value & " " & "(" & Range("B16").Value
    newFile = fName & " " & Format$(Date, "dd-mm-yyyy") & ")"
    ActiveWorkbook.SaveAs Filename:=newFile
    End Sub
    [/VBA]

    Again sorry for lack of knowledge, just trying to self teach at home to help out at work

    Thanks
    Last edited by mykal66; 07-17-2011 at 07:32 AM. Reason: spelling

Posting Permissions

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