Edit VBA and VSTA macros in SOLIDWORKS

Edit ArticleEdit Article

Source code for VBA macros (*.swb and .swp) as well as VSTA macros (.csproj and *.vbproj) can be edited directly within SOLIDWORKS.

  • Navigate to Tools->Macro->Edit menu command

Edit macro menu command
Edit macro menu command

  • Browse for the specified macro (change file filter if necessarily)
  • Alternatively select the macro from the recent files if available

This command will open new VBA Editor or Visual Studio (VSTA macro editor).

Modify the code as needed and save the changes


All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.

Product of Xarial Product of Xarial