savecopyas question

S

scott23

Hi folks,
Does the SaveCopyAs command in a macro HAVE TO create a temporary file
?
I feel like it is just slowing down the already lengthy process of
saving and copying my file twice. First is just saves itself and then
it copies it to a backup drive. The latter of the two operations
seems to take a long time on this 3500k file.


This is the current macro:

Sub Backup()
Fname = ActiveWorkbook.Name
ActiveWorkbook.Save
ActiveWorkbook.SaveCopyAs "J:\Trading\" & Fname
End Sub
 
D

Don Guillett

Here is one I use that does the same thing. You may find it useful since it
will make a backup folder for the active folder, IF desired. I can't answer
the basic question.

Sub Backup() 'kept in personal.xls & assigned to toolbar button
On Error GoTo BackupFile
MkDir CurDir & "\Backup"
BackupFile:
With ActiveWorkbook
MyWB = .Path & "\BACKUP\" & .Name
.SaveCopyAs MyWB
.Save
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top