View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andyjim Andyjim is offline
external usenet poster
 
Posts: 70
Default Don't want backup copy in XLSTART

I have the following macro assigned to a button to allow the user to make a
backup copy in the current folder (example: Backup_Username.xls). Works OK,
but sometimes (I haven't figured out under what circumstances) a copy turns
up in XLSTART as well. And then of course that copy opens next time the user
launches his file, which is a nuisance. Don't know how to prevent that
happening.

Sub Backupbutton()
'Creates backup copy of user's file, in same folder

Dim usrfile As Workbook
Dim backname As String
Set usrfile = ActiveWorkbook
path = ActiveWorkbook.path
backname = path & "\" & "Backup_" & usrfile.Name
usrfile.SaveCopyAs filename:=backname

End Sub