C/C++ Passing a VBA array to a C++ dll - Example Needed

  • Thread starter Thread starter CFDFEAGURU
  • Start date Start date
  • Tags Tags
    Array C++ Example
Click For Summary
The discussion centers around the challenges faced in the book "Financial Applications Using Excel add-in Development in C/C++" by Steve Dalton, particularly regarding the lack of practical examples for passing arrays from VBA to C/C++. The original poster expresses frustration over the book's unclear writing and missing example files. A request is made for a simple demonstration of how to transfer a 1-D array from VBA to C++, perform operations on it, and return the results to VBA. A user suggests a Microsoft support link that provides relevant information, which the original poster finds useful. The conversation highlights the need for clearer examples in technical literature and the importance of community support in overcoming such gaps.
CFDFEAGURU
Messages
781
Reaction score
10
Hi all,

In the book "Financial Applications Using Excel add-in Development in C/C++" 2nd edition by Steve Dalton in Section 3.7.2 Passing arrays and ranges from Excel to VBA to C/C++ and in that section a description of how this can be done is given. No example of how to do this is given and he refers to an "example.dll" that isn't provided. This book is horrible written but seems to have all the information buried in it some where.

Could anyone provide a simple example of how to pass a 1-D array or vector from VBA to C++ then do a simple operation on the passed array values and then return the array values to VBA?

Thanks.
 
Technology news on Phys.org
Hey CFDFEAGURU.

Have you seen this?

http://support.microsoft.com/kb/207931
 
chiro, no I didn't come across that one. Thank. I will see if I can use that.
 
Yes, that methods works perfect. Sorry for the very slow response.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 15 ·
Replies
15
Views
5K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
3
Views
4K
  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
14K