• Save copy of workbook (2007)

    Author
    Topic
    #457572

    Hello all,

    I’m trying to save an exact workbook to a central location and can’t seem to figure out this simple function.

    Here is the latest code I’ve tried:

    ActiveWorkbook.SaveAs “sharedFeb09” & ThisWorkbook.Name

    When running it, I get an error saying I can’t have two workbooks open with the same name.

    I tried another approach and the workbook ended up being named “False”. (I’ve since changed the code that produced that result, and therefore don’t remember it)

    Any help is much appreciated.

    Thanks!

    Viewing 0 reply threads
    Author
    Replies
    • #1147692

      I don’t understand why you’d get that error message (but I don’t have Excel 2007).

      Does it make a difference if you use SaveCopyAs instead if SaveAs?

      • #1147695

        I just tried SaveCopyAs and it saved a copy of my personal workbook. I don’t need that copied. Just the active sheet.

        • #1147696

          If your code is in your personal macro workbook, ThisWorkbook will refer to that instead of to the active workbook. Replace ThisWorkbook with ActiveWorkbook in your code (and use SaveAs again).

    Viewing 0 reply threads
    Reply To: Reply #1147697 in Save copy of workbook (2007)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel