Forum Discussion

Lorenzo Kim's avatar
Lorenzo Kim
Bronze Contributor
Jul 02, 2018

VBA to restore excel defaults

Is there a vba code to restore the original settings/defaults of excel without stating what have been 'un'defaulted or changed?

many thanks

2 Replies

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    If you are referring to things like Calculation settings and the like the answer is "It depends".
    The only proper way to do this is to try and respect the users original settings before your macro changed them. If your macro runs without errors, this is not hard to do: declare a variable for each setting and use it to store the setting before changing it. That way you can change it back to that value when you are done.

Resources