none
Convert Macros to Visual Basic RRS feed

  • Question

  •  

    If I click "Convert Macros to Visual Basic", what happens?

    There is no indication on the screen and no Help available.

    Does it delete the macros or make any other changes to existing code?

    I just want to convert these macros so I can figure out what they are doing.

    But I do not want to change the macros in any way that will affect the running of this application.

    Thursday, May 4, 2017 11:19 PM

Answers

  • Say your in a Form and you have an [Embedded Macro] for a given event and then you execute the Convert Form's Macros to Visual Basic, it will generate the equivalent VBA code and change the [Embedded Macro] to [Event Procedure].  So in fact, the [Embedded Macro] is lost/replaced.

     

    Now, if you have a Macro object (not an embedded macro in a form or report) and execute the Convert Macros to Visual Basic command, it will generate a new standard module with the equivalent VBA code, but it leaves the original Macro intact.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Friday, May 5, 2017 12:32 PM

All replies

  • It does exactly what the name implies, it replaces macros with their VBA equivalent.

    If you don't want to make any change to your existing db, make a copy to play around with and then try the command out to see exactly what happens.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, May 4, 2017 11:53 PM
  • Hi,

    I believe it keeps the original macro intact. It just makes a new VBA version of it in a Standard Module.

    Friday, May 5, 2017 12:34 AM
  • Say your in a Form and you have an [Embedded Macro] for a given event and then you execute the Convert Form's Macros to Visual Basic, it will generate the equivalent VBA code and change the [Embedded Macro] to [Event Procedure].  So in fact, the [Embedded Macro] is lost/replaced.

     

    Now, if you have a Macro object (not an embedded macro in a form or report) and execute the Convert Macros to Visual Basic command, it will generate a new standard module with the equivalent VBA code, but it leaves the original Macro intact.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Friday, May 5, 2017 12:32 PM