Consulting

Results 1 to 3 of 3

Thread: Excel 97 help / SaveCopyAs

  1. #1
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location

    Excel 97 help / SaveCopyAs

    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?

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    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,
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  3. #3
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •