Macro not working on new workstation

The attached macro works fine on my old pc but not on my new workstation. The references on both machines are the same.

SolidworksApi macros