I am trying to invoke a set of common macros that need to be executed after importing the data from excel sheet into a data model using another Macro. Any help would be greatly appreciated!
Yes, there is a way to do this. Create your common code in a separate file that is then referenced in other macro code by the '#Uses' command, as in the following - note that it is coded as a comment"
'#Uses "..\..\Reusable Functions\Reusable Functions.bas"
'++++++++++++++++++++++++++Then you can call the functions in your common .bas file from any macro in which you add the #Uses statement as ifit were contained directly in that .bas file.The WinWrap Basic Help file has some information about this.
If you are looking to just run macro B from macro A, you can use the MacroRun command - you can pass parameters to the second macro as well:
MacroRun MacroDir & "\Macro B.bas", myParameter
@spfister ... Thanks for the suggestions. I implemented MacroRun command for my use case and it worked perfectly ! :)
Powered by IDERA