Security: Trusted Location is lost

Pepe55

New Member
Joined
May 22, 2014
Messages
1
Hi there,
My macro uses a function in an external DLL declared on top like:
Declare Function Calculate Lib "CalculationsLib.dll" (ByVal param1 As Integer, ByVal param2 As String...)

The DLL library is in the same path as the excel document. Then the instruction in the macro is like:
result = Calculate(..)

When I launch the macro, this instruction fails telling the lib is not found (error number 53)
Well, an easy solution is to define my folder in "Trusted Locations" in Excel security options, or even put the files in an already existing trusted location. Then the macro launches the function without any error and get the result.

But the problem is when I've closed the Excel application and started again. I take the same error and have to remove the path from the trusted locations and put it on again to work with the lib.

Any help?

Thanks
Pepe
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,216,157
Messages
6,129,195
Members
449,493
Latest member
JablesFTW

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