Solved

Question about using DLLs in Excel 2010

Posted on 2011-09-15
3
299 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now