here is some macros that I use for Undo My selection sets. its useful when you are animating and want to only undo your selection and swich between your controllers and not undo the action such as move ,rotate etc... . remember that it only works in object mode and not in any sub-object level like vertex selection.
After placing files , Run Max, go to Customize > Customize user interface > toolbars tab
then in the dropdown list named "category", choose "UserScripts" and then,Drag and drop "UndoSelection_Undo" and "UndoSelection_Redo" into your max ui. sorry for that files are seperated, I coudn't make a maxScript zip file. hope it be useful. report any problem.