> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Overcoming Programming Language Barriers with COM
- URL: https://nolongerset.com/language-barriers/
- Published: 2022-03-27T03:59:00.000Z
- Updated: 2026-05-08T12:58:48.000Z
- Description: COM is sort of like a Chinese restaurant.
- Author: Mike Wolfe
- Tags: COM, #Import 2026-05-20 02:59

Trying to get VBA to communicate with C++ is like an English-speaking American trying to order dinner from a Chinese-speaking restaurant owner.

There is a language barrier in both cases. To tackle this problem, we need to start by identifying some common ground. 

The solution is the same for both: **pointers**. 

Both VBA and C++ understand the concept of *pointers* to memory locations. Likewise, both the American customer and Chinese restaurateur understand the concept of using one's *pointer* finger to show what one wants.

## Found in Translation

To overcome the language barrier, the restaurant prints menus with choices shown in both English and Chinese. 

The customer points to the English words that describe what he wants to order. The owner reads the Chinese characters printed alongside the English words. He prepares the food and sells it to the customer. Despite the two parties speaking different languages, the English/Chinese menu allows them to communicate.

The same concept applies in COM. 

## Translating Between VBA and C++

COM plays the role of the English/Chinese menu. 

Rather than VBA and C++ talking to each other directly, VBA simply points to a location in memory where the relevant C++ functionality resides. 

COM provides C++ with instructions for *exactly* how to organize its executable code when it gets loaded into memory. Then, COM tells VBA where to point to reach the executable code that C++ provides.

There's a *bit* more to it than that, but that is the basic overview.

*Image by [Engin Akyurt](https://pixabay.com/users/engin%5Fakyurt-3656355/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=4219235) from [Pixabay](https://pixabay.com/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=4219235)*