Artem Taturevych

SOLIDWORKS API Tips & Tricks: Pass Parameters To VBA Macro

Discussion created by Artem Taturevych on Apr 2, 2018



As you may know there is no out-of-the-box way to pass the parameters to VBA macros.


This could be a handy feature in cases where the macro is used as the part of bigger automation where multiple macros need to share the same argument (e.g. output location, time stamp, etc.). Or process is started from the server application or via scheduling software which generates the input which needs to be passed to the macro.


I have create a blog article which demonstrates the workaround for this issue where it is possible to pass the parameter to VBA macro from C#, VB.NET or another VBA macro: Code Stack: Pass Parameters To VBA Macro