"Error loading DLL" when compiling a DLL in VB6
I saw that this error occurs when referenced components are recompiled without compatibility, but previous dll versions were not pre-registered not , therefore registry keys for typelibs are not deleted and these dummy registry entries point to new DLLs.
I usually communicate with them using an internal registry cleaner, which can remove typelibs / clsid / interfaces from register based on the location of the typelib disk. You can try to move the physical files of the link projects to another location on the disk and regsvr32 them there, manually delete the links from the project file, restart the IDE and reopen the project, finally add the links and check that the dll location in the additional dialogs links to the location of the new files .
In 2019, the same error occurred on my old xp laptop in a project migrated from Excel VBA to VB6. I read all the answers above and could not solve the problem (for starters, there are no missing links, and not many changes were made to the default library locations). What actually solved my problem is rather strange. I double-clicked and opened all the forms and Designer modules (in fact, loading their components into memory) and voila, the error disappeared on its own. I tried to reproduce the error and it returns when I run the IDE again. Finally, it turned out that there is one such cumbersome user form with great control - the culprit. I could not understand which control was causing the dll error, but so far the work has been completed.