@Jose wrote:
The other workbook was in a different excel instance.
I have tried now opening the .XLSX in the same instance and it works.The easiest way is to develop the macro in the other workbook before compiling the compiled workbook. Then compiling it to have the .EXE.
After this you have to open the .EXE and the .XLSX in the same instance.
Thank you for your support.