I have my code in an excel file but the problem that I can't open this file. What can I do in this case? It's in 100% and I wait and it doesn't like to be opened.
I am not really sure if this is going to help. But I was unable to post this "picture" in a comment. Hence, I am posting it as a possible solution to your problem:
Immdediate Window
in the VBEThe file should now open in read only
mode and a small window should notify you that Excel attempted to repair the file while opening it.
Workbooks.Open FileName:="C:\tmp\ProblematicFile.xlsm", UpdateLinks:=False, ReadOnly:=True, CorruptLoad:=xlRepairFile