declare sub subName lib "some.dll" (parameters) declare sub subName lib "some.dll" alias "otherName" (parameters) declare function funcName lib "some.dll" (parameters) as returnType declare function funcName lib "some.dll" alias "otherName" (parameters) as returnType
declare
is needed to locate a procedure or function in a DLL. declare
with dim
. ptrSafe
attribute indicates to the VBA compiler that the declare
statement is targeted for a 64-bit version of Office. Without this attribute, using the declare
statement in a 64-bit system will result in the compile-time error The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute.