Use unmanaged DLL in VBA for building Excel Add-in

No matter the dll was registered or not. This method could use dll directly. But if the dll was built by yourself, it must be no dependency with other self-defined dll or lib. Or you need to also declared the dependent dll and call any function in the dependent dll.

It sound like ridiculously. But if you did not doing so, the IDE would tell you SOME.DLL NOT FOULD.

Or there is another way, you can use chDir to change VBA default dll search dir, that will help the IDE to locate dlls in the dependancy hell.

The Excel add-in use the xla extension file name. It could use userform for user UI just like MFC application.

Use “UserForm1.Show” to enable the UI. “Unload Me” to close userform.

Insert dashboard graph in VBA:


Originally published at bustta.logdown.com. @ March 21, 2013

Kenneth Hung-Ju Tsai

Written by

Software Engineer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade