Hi Everyone,

Not sure this is a right platform to raise this query.

I have created a Excel macro which performs specific functions. Due to security reasons i have decided to create my functions in dll and distribute

When i try to create a dll/class library in VS2013, i receive the below error.

"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in PDUNZDLL.dll

Additional information: Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154."

Basically what i have done is created a application with form along with a button. On button click, it will call a function inside my dll.

Below is my Dll code

Please Login or Register  to view this content.
Please guide me in right direction. I believe once i create an object for excel properly in my dll i will be able to do the rest.