I'd like to ensure that my code is linking to a dll that I've placed in the same folder as my spreadsheet. What code would I use to do this? This is the code that I'm working with. The dll is swedll32.dll. https://pastebin.com/nfwkHRfA
I'd like to ensure that my code is linking to a dll that I've placed in the same folder as my spreadsheet. What code would I use to do this? This is the code that I'm working with. The dll is swedll32.dll. https://pastebin.com/nfwkHRfA
You can also place the dll file in a folder of your choice but then you would need to fully qualify the dll path in the declare statement... So for example if you place the dll in the C:\Test directory then this is how you should call the swe_calc function :
Code:
Private Declare Function swe_calc Lib "[B][COLOR=#ff0000]C:\Test\[/COLOR]swedll32.dll[/B]" Alias "_swe_calc@24" ( _
ByVal tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef x As Double, _
ByVal serr As String _
) As Long
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.