Use DLLs
Dynamic link libraries (DLLs) are used everywhere in Windows. Many of the Visual Basic and Excel members merely encapsulate Windows DLL calls—for example, the Shell function is equivalent to the Windows WinExec function in kernel32.dll that is at the core of Windows.
There’s little point in using WinExec instead of Shell; however, many other DLL functions
aren’t available from Visual Basic or Excel. In general, those functions give you access to low-level tasks that aren’t the usual focus of Visual Basic or Excel.
To use a function from a DLL:
Find the function you want to use.
Declare the function at the module level.
Call the function within your code.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access