Logo 
Search:

MS Office FAQ

Submit Interview FAQ
Home » Interview FAQ » MS OfficeRSS Feeds

Is it possible to run a macro from within another macro? If so, how will you do it?

  Shared By: Shruti Sharma    Date: Jan 20    Category: MS Office    Views: 845

Answer:

To run a macro from another macro or from a Visual Basic procedure, add the RunMacro action to your macro or procedure.

• To add the RunMacro action to a macro, click RunMacro in the action list in a blank action row, and set the Macro Name argument to the name of the macro you want to run.

• To add the RunMacro action to a Visual Basic procedure, add the RunMacro method of the DoCmd object to your procedure, and specify the name of the macro you want to run; for example, the following RunMacro method runs the macro My Macro:
DoCmd.RunMacro "My Macro"

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: