mykal66
07-17-2011, 07:20 AM
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
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
Again sorry for lack of knowledge, just trying to self teach at home to help out at work
Thanks
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
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
Again sorry for lack of knowledge, just trying to self teach at home to help out at work
Thanks