Link to home
Start Free TrialLog in
Avatar of headpygmie
headpygmieFlag for United States of America

asked on

Question about using DLLs in Excel 2010

Hello all.  I think Excel 2010 is the proper spot for this question.

I have some VBA code that calls an ActiveX DLL (VB6).  The DLL actually also calls a normal DLL to get some information.  I pretty much don't want to call that normal DLL in VBA.  Anyway, this has been working fine for all Excel versions from 97 to 2007.  But now, I get an error in 2010.

It says that it can't find the normal DLL file.

The weird thing is that I have both 2007 and 2010 on my computer and it's using the exact same files (and directory location).  It works in 2007, but not 2010.  

Any ideas on this?  Does 2010 process DLLs differently?

Thanks,
HeadPygmie
Avatar of Dennis Wallentin
Dennis Wallentin
Flag of Sweden image

Hi,

Since it work with Excel 2007 it confirms that the DLL has been registered on the computer.

This kind of issues is rather complicated to track down so we must have some patience with it.

First action I suggest You do is to confirm that the option "Trust access to the VBA project object model is checked in Excel 2010":

Select File > Options
In the dialog select Trust Center
Next click on the Trust Center Settings button
Select the option Macro Settings
Under the section Developer Macro Setting You find the option.
If it's not checked then check it and reboot Excel 2010.

Second action  i suggest is to make sure that the references in the workbook is OK when You open it in Excel 2010:

Open Excel
Open the workbook
Switch to the VB Editor
Select the command Tool > References...
If it exist a reference in the dialog like "MISSING" then uncheck it, close the workbook and open it.

Let us see if the above will be helpful or not.
ASKER CERTIFIED SOLUTION
Avatar of headpygmie
headpygmie
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial