Backup works for some users, not for others...

Mississippi Girl

Board Regular
Joined
Oct 27, 2005
Messages
148
We have a workbook that is shared by a lot of people. It's saved on a network drive and users of the workbook go in and make updates as needed. We've been having problems with folks forgetting to save their work, so I included this bit of code to save a "back up" before the file is closed, regardless of what the user says about saving.
It works perfectly with some people, but others receive an error saying the file cannot be accessed. Any ideas why some can use it and others cannot?

Code:
Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean)

Dim MyBackupPath As String

MyBackupPath = "N:\_BA21.N\CFO Monthly Status\FY2015\CFO Monthly Status\backup\"

ActiveWorkbook.SaveCopyAs MyBackupPath & Format(Now, "yy.mm.dd h mm a/p") & " " & Application.UserName & " " & ActiveWorkbook.Name


End Sub
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

ParamRay

Well-known Member
Joined
Aug 6, 2014
Messages
1,195
.
.

Could it be that the N:\ drive is mapped with a different letter on different users's PCs?

Try substituting the "N:\" part of the path with the absolute network path, for example:

Code:
\\server\sharename\_BA21.N\CFO Monthly Status\FY2015\CFO Monthly Status\backup\
 

Mississippi Girl

Board Regular
Joined
Oct 27, 2005
Messages
148
That seems to be the problem. I can't believe it was that easy. I've been bugging out for days. Thanks so much!
 

Watch MrExcel Video

Forum statistics

Threads
1,099,773
Messages
5,470,698
Members
406,718
Latest member
waseem11

This Week's Hot Topics

Top