CHAPTER 23The Windows Application Programming Interface (API)

In this chapter, you will:

  • Understand the parts of an API declaration

  • Learn how to use an API declaration

  • Make 32-bit- and 64-bit-compatible API declarations

  • Review some API function examples

With all the wonderful things you can do in Excel VBA, there are some things that are out of VBA’s reach or that are just too difficult to do, such as finding out what the user’s screen resolution setting is. This is where the Windows application programming interface (API) can help.

If you look in the Windows System directory \Windows\System32 (Windows NT systems), you will see many files with the extension .dll. These files, which are dynamic link libraries (DLLs), contain various functions ...

Get Microsoft Excel 2019 VBA and Macros, First Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.