3
votes

I have an Excel tool I've been building at work to automatically generate PowerPoint charts from data on Excel sheets. I've been moving the project back and forth between my work and home computers.

At work I have Excel 2013 and at home I have Excel 2016. So when I move the file from home to work, I have to go into references and uncheck the "MISSING: Microsoft PowerPoint 16.0 Object Library" and check "Microsoft PowerPoint 15.0 Object Library"...no big deal.

Until this morning. When I open the VB Editor I get a messagebox

Error in loading DLL

I can't open any of the forms of modules...I just get that messagebox.

When I go to references I've tried

  • Uncheck the missing entry for v16 and check the entry for version 15 -- I get the error in loading DLL message
  • Just unchecking the entry for v16 -- I get the error in loading DLL message
  • Leaving them both checked -- I (obviously) get the error message "Name conflicts with existing module, project, or object library"
  • Uncheck the missing entry, check the correct entry, and move its priority above the (unchecked) missing entry -- I get the error in loading DLL message.
1
Have you tried using late binding instead? That would help resolve version issues.braX
Have you tried using late binding? Or loading reference by pointing to the path where the DLL is located?QHarr
I could try that...if I could get back into the file. Right now I can't even see the code. There's a gray VBE window and whenever I try to open a form or module I get "Error in loading DLL"jerH
Can you open without enabling content/macros and then open vbe?QHarr
Forgive my ignorance, but how would I do that? You usually see that "enable macros" button the very first time you open the file...after that it opens automaticallyjerH

1 Answers

1
votes

Had this issue before. My macro used the Microsoft Outlook 12.0 Object Library and was designed to work with that for all users of the team. However since an update to Office 365 was planned one of the IT guys had opened the macro with the new Office 365(and Microsoft Outlook 16.0 Object Library was set to be used). After this all of the users had:Error in loading DLL on their screen as they were still on the old Office 2007 and the new library Microsoft Outlook 16.0 Object Library was in the References list. Tried in vain to unselect the new one and select the old library.

My solution to this issue:

  1. open a new excel file(not a macro)
  2. go into the Ribbon(office 2007 & 2010)->Excel Option->Trus Center tab->Trust Center Setting button->Macro Settings
  3. select option: Disable all macros with notification and then click Ok button
  4. Close the Excel file opened(not the excel window) - from the lowest X on the right corner
  5. Open the macro using the Ribbon and then option Open
  6. Get into the dev mode(ALT+F11) and go to Tools->References then unselect the broken Excel library(the one with MISSING:)
  7. Select the correct library from the list and click OK
  8. Save the macro and then close it.
  9. Revert the selection done at step3 to option:Enable all macros and Voila!