Hi
This is possible but not easy. You would have to put code in your macro to save all the changes made. There is an example of the at www.j-walk.com/ss but it probably isnt worth the trouble.
Jacob
1. How about tweaking your macros to save the file before running the rest of your code (assuming you don't have any code that already saves the file)?
The advantage: You can simply close without saving and reopen to the most recent point before you hit the wrong button.
The Disadvantage: This only works if you if you notice you ran the wrong macro immediately after running it. If you don't catch it before running another macro that also saves right off, you'll get stuck with those changes.
2. You could also go with a preventive approach: start the code with a MsgBox that asks if you're running the correct macro ("Did you mean to run the x-macro at this time? Y/N).
Advantage: You'll probably catch yourself before running the wrong macro.
Disadvantage: Msg boxes can get irritating fast.
Hope that helps
Adam S.
nother possible work around:
Tim,
Is there a unique modification on the spreadsheet that you can check for at the beginning of your macro, so that if that unique item or whatever exists your macro "knows" its already done its thing?
With that said, you could always add some sort of unique thing to the sheet and check for it.
enjoy