Solved

Question about using DLLs in Excel 2010

Posted on 2011-09-15
3
304 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:headpygmie
3 Comments
 
LVL 10

Expert Comment

by:XL-Dennis
ID: 36548612
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.
0
 

Accepted Solution

by:
headpygmie earned 0 total points
ID: 36562136
Hello Dennis,

Thanks for you reply.  I thought I replied already but I guess I'm spacing it!  

Anyway, I did check the settings and they were fine.  And I didn't have any reference issues.

I ended up talking with the maker of the DLL and tried a newer version of their DLL and it worked fine.  I still don't know why what caused the problem, but it's at least working now.

I'll close this out and will give you the points.

HP
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question