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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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