Reference problem on vba code to open Excel from SolidWorks

Hello everyone,

I want to reuse and modify an existing code from d.roger, but it marks well in this post:

https://www.lynkoa.com/forum/solidworks/ecrire-sur-un-fichier-excel-depuis-le-vba-solidworks

That you have to add the reference "Microsoft Excel xx.0 Object Library".

On the other hand when I try to activate it I get this message:

"Name of a project module or object library that is already in use"

And as a result, it is impossible to validate the reference.

Can you help me?