PDA

View Full Version : [SOLVED] Excel 97 help / SaveCopyAs



mvidas
11-09-2004, 10:22 AM
Hi All,

I'm trying to help someone who has excel 97, and I've only got 2000.
From everything I can find on the MS website, savecopyas is a valid procedure in xl97.

But for some reason, when the code

ActiveWorkbook.SaveCopyAs "C:\2963372.xls"
is run, it gives a "The file could not be accessed" error.
But,


ActiveWorkbook.SaveAs "C:\2963372.xls" works just fine

Any ideas?

Ken Puls
11-09-2004, 12:58 PM
Hi mvidas.

Using ActiveWorkbook.SaveCopyAs ("J:\testing.xls") worked just fine for me. Then I opened up the testing.xls file and ran the code again and got the error you've mentioned.

I'm guessing that 2963372.xls is open on the system somewhere...

HTH,

mvidas
11-09-2004, 01:29 PM
Oh that would be really funny if it were open elsewhere when they tried to save. I'll see what I can find out, I only tested it on mine (xl2000) to see if it gave the error if the file already existed.

Thanks! Simple enough, just didnt think about it!