DLL loading question

trumanchua

New Member
Joined
Jan 4, 2018
Messages
1
[FONT=Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif]so i'm reading this link

[/FONT]https://msdn.microsoft.com/en-us/library/office/bb687915.aspx#sectionSection2

i've created a spreadsheet

i'm able to do a Public declare of my DLL function called "myfunc" and write a VBA macro calling that DLL function called "mymacro"

then i enter that macro name in cell A1 like so "=mymacro(param1, param2) - everything works

now i go to cell B1 and type in "=myfunc" where "myfunc" is the name of the DLL function that i've just accessed previously thru "mymacro"

now i get a #Value from excel

why ?

now if i deleted all my VBA code in the same spreadsheet and simply load the same DLL thru the ADDIns Manager and then call the same DLL function "myfunc" directly in a cell - "=myfunc(param1, param2)"

again everything works

so what i've outlined here are 2 of the methods described in the article referenced at the top of this post - am i right to assume that only one of these methods can be implemented at any given time ? they can't mingle/co-exist ?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,215,212
Messages
6,123,653
Members
449,111
Latest member
ghennedy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top