Are you a sample made
You have examples at the link Deepak provided
Here is the example from the link I've given.
Dim swApp As SldWorks.SldWorks
Dim boolstatus As Boolean
Set swApp = Application.SldWorks
Dim runMacroError As Long
boolstatus = swApp.RunMacro2("c:\test\RunMacroSub.swp", "RunMacroSub1", "main", swRunMacroUnloadAfterRun, runMacroError)
Replace "c:\test\RunMacroSub.swp" with the macro path you want to run.
Replace RunMacroSub1 with the other macro Module name.
Replace main with other macro Procedure name
and finally set the options as swRunMacroDefault OR swRunMacroUnloadAfterRun
you do have a macro attached