J
JoAnn
Can someone tell me what is wrong with this code?
It keeps generating Runtime Error 1004 (can't find file) on the SaveAs line
& I can't figure out why. I also tried using CopyAs & got the same error.
I've got this in Module1 not ThisWorkbook.
Sub SAVE_Quit()
' save current sheet in same location, create backup & quit Excel
Path = "http://dms/sites/cfg/1/f/f/CAS Product Documentation/_ DRAFT (Submit
Docs for Formatting - Report and Docs)/Bkp/"
Name = Application.UserName & Format(Date, "mmddyy") & "_" & Format(Time,
"hh:mm:ss") & ".xls"
Bkp = Path & Name
ActiveWorkbook.Save
ActiveWorkbook.SaveAs Filename:=Bkp
Application.Quit
End Sub
Also ... the 1st save prompts to save as same filename to the same location.
Anyway to make that only happen if someone else is in the same file?
Since this is in Sharepoint, we see "Read Only" on all our opened files & I
need a way to know if someone else is truly in the file before saving it (to
ensure they don't overwrite).
Thanks,
It keeps generating Runtime Error 1004 (can't find file) on the SaveAs line
& I can't figure out why. I also tried using CopyAs & got the same error.
I've got this in Module1 not ThisWorkbook.
Sub SAVE_Quit()
' save current sheet in same location, create backup & quit Excel
Path = "http://dms/sites/cfg/1/f/f/CAS Product Documentation/_ DRAFT (Submit
Docs for Formatting - Report and Docs)/Bkp/"
Name = Application.UserName & Format(Date, "mmddyy") & "_" & Format(Time,
"hh:mm:ss") & ".xls"
Bkp = Path & Name
ActiveWorkbook.Save
ActiveWorkbook.SaveAs Filename:=Bkp
Application.Quit
End Sub
Also ... the 1st save prompts to save as same filename to the same location.
Anyway to make that only happen if someone else is in the same file?
Since this is in Sharepoint, we see "Read Only" on all our opened files & I
need a way to know if someone else is truly in the file before saving it (to
ensure they don't overwrite).
Thanks,