Forum Discussion

Vytautas Slivinskas's avatar
Vytautas Slivinskas
Copper Contributor
Jul 13, 2018

SaveCopyAs clear memory? Undo not working

Hello,

 

I've created "AutoSave every 5 min" by using "ThisWorkbook.SaveCopyAs file.xlsx", but noticed after doing SaveCopyAs Excel loses memory on function "Undo". Can someone explain me why? or give a tip how to bypass this? I need Undo/Forward be usable after SaveCopyAs.

3 Replies

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi,

     

    Unfortunately, there is no option to undo the effects of a VBA code.

    But there are some workarounds like http://spreadsheetpage.com/index.php/tip/undoing_a_vba_subroutine/.

     

    Regards

    • Vytautas Slivinskas's avatar
      Vytautas Slivinskas
      Copper Contributor

       

      This is strange. If i press button Save the Undo works, if i use ActiveWorkbook.save the Undo already does not work.

      • Haytham Amairah's avatar
        Haytham Amairah
        Silver Contributor

        Hi,

         

        The reason why is the code behind the Save Button is native code, and it differs from the ActiveWorkbook.Save which is a VBA code.

Resources