The VSTA (.NET based macros) was introduced in SolidWorks 2012 (if I'm not mistaken). If you are using appropriate version try reinstalling VSTA on your machine. Please check this thread:
https://forum.solidworks.com/message/391108#391108 and follow the steps in last message by Simon.
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
translationXpert – SolidWorks files language translator