How to use 'Type' in the macro?

I am modifying the code and I use Type. VBA says that there is error. Any suggestion why it happens?

Thanks

SolidworksApi macros