1 Reply Latest reply on Mar 31, 2016 12:55 AM by Deepak Gupta

    VBA Editor

    Alan Thomason

      I have used VBA quite a lot with Microsoft Excel.  Excel allows initiating that editor directly with 'Developer / View Code'.  Is there a way to do that in SolidWorks or is it always necessary to edit an existing macro?

       

      Also, is there a way to save a macro to a new name?  I have had to go into File Explorer and rename the file directly, but I would rather do this from the editor.

       

      Finally, is it possible to modify the macro and run it directly or is it necessary to get out of the editor each time?

       

      Thanks in advance...

        • Re: VBA Editor
          Deepak Gupta

          Alan Thomason wrote:

           

          I have used VBA quite a lot with Microsoft Excel. Excel allows initiating that editor directly with 'Developer / View Code'. Is there a way to do that in SolidWorks or is it always necessary to edit an existing macro?

          I think SW is doing the same thing. You can run macro in excel by pressing the command button or shortcut and to edit codes you need to go in view/edit code mode. IN SW you do the same thing with editing the macro.

           

          Also, is there a way to save a macro to a new name? I have had to go into File Explorer and rename the file directly, but I would rather do this from the editor.

          Rename from explorer (sorry no other way)

           

          Finally, is it possible to modify the macro and run it directly or is it necessary to get out of the editor each time?

          You can use the run button while in the editor

          .