Don't want backup copy in XLSTART
Thanks Dave,
I changed the code thus:
Dim usrfile As Workbook
Dim backname As String
Set usrfile = ActiveWorkbook
Dim p As String
p = ActiveWorkbook.path
backname = p & "\" & "Backup_" & usrfile.Name
If InStr(1, p, "xlstart", vbTextCompare) = 0 Then
usrfile.SaveCopyAs filename:=backname
Else
'do nothing
End If
It hasn't put a copy in XLSTART since, but then neither has another file
using the previous code. I still have no clue under what circumstances it
does put a copy in XLSTART (it's been inconsistent best I could tell), so
unfortunately I don't know whether it's really fixed or not. Best I can do is
go with it until proven wrong. If you have ideas why a copy should ever show
up in XLSTART, I'd at least feel better...
|