Do people still use VBA for Word documents?
Anyways, I inherited a Word doc that has a 10-year-old VBA code written into it. It basically has about 15 different forms that come and go through the course of asking questions that runs through a macro (VBA module). I have been tasked with making a simple CANCEL button.
If you want to stop running the macro and hit the red X on a form, it just pops up the next form and keeps cycling through them until all the forms have been opened and closed. What I can't figure out is, a simple VBA line that will just cancel the whole macro/module when a cancel button is pushed.
Does anyone know of a simple line (or lines) of code that would just kill the macro when a user pushes a cancel button? Thanks!
Anyways, I inherited a Word doc that has a 10-year-old VBA code written into it. It basically has about 15 different forms that come and go through the course of asking questions that runs through a macro (VBA module). I have been tasked with making a simple CANCEL button.
If you want to stop running the macro and hit the red X on a form, it just pops up the next form and keeps cycling through them until all the forms have been opened and closed. What I can't figure out is, a simple VBA line that will just cancel the whole macro/module when a cancel button is pushed.
Does anyone know of a simple line (or lines) of code that would just kill the macro when a user pushes a cancel button? Thanks!