How to run all macros once only in word document

  • Hi there,


    I have created some macros for setup invoice. but I want to use all macros once only as if by mistake i use more than once all setup changes and unexpected result is coming up. so will you please guide me how to put vba code to run each macros once only.


    Thanks you and Regards,
    Niky

  • Hi Niky,


    There are a couple of ways to achieve this.


    Create a new subroutine and call all the macros from that.


    Or...


    Define a Boolean variable i.e. blnMyMacroRun As Boolean for each macro. Which you set to True at the end of the macro. At the start of the Macro check whether it is True and Exit Sub if it is.



    Regards,


    Tom Rowe