Solved

Question about using DLLs in Excel 2010

Posted on 2011-09-15
3
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

738 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