always_confused
Board Regular
- Joined
- Feb 19, 2021
- Messages
- 68
- Office Version
- 2016
- Platform
- Windows
Hello,
I'm relatively new to VBA. Sometimes I'll run a macro that has a mistake i it and it messes up my whole worksheet. Undo doesn't work in these cases, and if the sheets has been saved during the macro, I can't just close and reopen the workbook to the last saved place. Is there some sort of equivalent to the SQL transaction in VBA? Something that allows changes to be made and then accepted or rolledback in case of a mistake?
I'm relatively new to VBA. Sometimes I'll run a macro that has a mistake i it and it messes up my whole worksheet. Undo doesn't work in these cases, and if the sheets has been saved during the macro, I can't just close and reopen the workbook to the last saved place. Is there some sort of equivalent to the SQL transaction in VBA? Something that allows changes to be made and then accepted or rolledback in case of a mistake?