I understand that I cannot load a 32 bit dll in a 64 bit process. I have a 32 bit dll (VB6 component), with no source code, that is loaded in an Excel automation macro. What are my options?
1 Answers
32-bit add-ins are not supported on 64-bit. Microsoft recommends to use the 32-bit version of Office unless you run into the memory limitations of a 32-bit process which is only likely to happen if you need to deal with extremely large spreadsheets:
The recommendations for which edition of Office 2010 to install are as follows:
If users in your organization depend on existing extensions to Office, such as ActiveX controls, third-party add-ins, in-house solutions built on previous versions of Office, or 32-bit versions of programs that interface directly with Office, we recommend that you install 32-bit Office 2010 (the default installation) on computers that are running both 32-bit and 64-bit supported Windows operating systems.
If some users in your organization are Excel expert users who work with Excel spreadsheets that are larger than 2 gigabytes (GB), they can install the 64-bit edition of Office 2010. In addition, if you have in-house solution developers, we recommend that those developers have access to the 64-bit edition of Office 2010 so that they can test and update your in-house solutions on the 64-bit edition of Office 2010.
If you need to go with the 64-bit version because of the memory limitations you have the following options:
If you have the source code, you can generate a 64-bit version yourself,
You can contact the vendor for an updated version,
You can search for an alternative solution.
There actually is a fourth option which is not mentioned in this article by Microsoft: You can create a 32-bit out-of-process COM server which serves as a proxy between your 64-bit macros and the legacy 32-bit COM components or create a COM+ application. A sample is provided here:

- 1
- 1

- 172,527
- 53
- 255
- 316
-
There is no 64 bit compiler for VB6. – Joshua Nov 18 '10 at 21:18
-
@Joshua: No there isn't. But the Microsoft article talks about general solutions to this problem. – Dirk Vollmar Nov 18 '10 at 21:27
-
"Accessing 32-bit DLLs from 64-bit code" has moved. I've fixed the link. – Ian Goldby Jan 13 '14 at 11:49
-
After another four years, how is this still a thing? The problem is just as acute as it was in 2013. – Maury Markowitz Feb 06 '18 at 16:05
-
@Maury Markowitz I was able to migrate an add-in from VB6 to VB.NET. It remains to be seen whether this will be 64-bit-compatible. – R.J. Dunnill Jul 29 '19 at 22:34
-
4@MauryMarkowitz It's 2020 and Covid19 is sweeping the earth. But the true hell is getting 32 bit DLLs to work in 64 bit Office installs. – Rob Mar 25 '20 at 14:12