Open ghost opened 4 years ago
Update:
When i copy and paste all the code into another project (With the same module and class names) it works again. Also the code in the old project compiles and can be used. Only when i let rubberduck parse the code Excel crashes.
Thanks for reporting. I have added some markdown to your issue in order to help readability.
I will have a look at it later.
Unless I've completely misunderstood the purpose of your code (it's early, that's possible), might I humbly suggest that you use Rubberduck's built in functions to handle code module import/export? I had done the same thing you had - built my own tool to import & export code and had issues with it. Letting the duck handle it has resolved many issues for me.
From the VBIDE's menu, select Rubberduck | Tools | Export Active Project...
then navigate to the directory of your choice. Rubberduck will export all code and document modules to this directory.
To import, right-click
in the Code Explorer pane, then select Sync Project
then either of the options presented. To be fair, the documentation is lacking somewhat (at least I can't find it with a cursory search), however, I believe that Update components from files...
will replace just the selected files, while Replace Contents from Files...
will delete all components and import only the selected ones.
This sounds like it might be related to issue #5442
Rubberduck version information The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:
Description I made an export tool for VBA projects at my company. The tool exports the modules to a folder. This way i'm able to work with sublime on my VBA code. This tool also imports these modules when i want to run code.
I've been working like this for a while but out of the blue rubberduck gives a resolver error.
I can't find any problems in my code and after trying to delete every module seperately i found out that this class was giving the problem:
So what i did was to delete every reference and the class to search for the problem. But when i press the reload button (blue arrows) excel crashes. It will show ready but the complete screen freezes.
this is the log:
Additional context
Please contact me at martijn@shared.nl if you need the project.
For your information my job description:
Technical team lead at Shared Robotics in the Netherlands
The file is for a client so i'll have to redact it but this is a issue that lies with the Rubberduck application.