Solved

How to use Visual Basic code from VC++

Posted on 2003-11-26
5
351 Views
Last Modified: 2013-11-25
hey all ,

I am quite new to Visual Studio environment can anyone tell me how to use Visual Basic code (macro) inside VC++.I am trying to program a standalone inplace of  a excel based application, the excel version currently has a few visual basic macros which do all the required computations. I want to use these macros from inside my VC++ code, how do I do it.  I think it can be done through a DLL ? but not sure how. Any solution/suggestions (a bit detailed  Pls am new to visual studio :) ). I am currently working on VC++.NET and code is in VB 6.0 .

Thanks in advance,
AM
0
Comment
Question by:AM15
  • 2
5 Comments
 
LVL 1

Expert Comment

by:vbs03
ID: 9830131
Hi,
    What u can do is depending on type of code impelemented in Excel VBA, try to create a corresponding ActiveX DLL/EXE.
In this DLL/EXE, based on the code create functions which will implement the Excel VBA code. Now u can reference this DLL/EXE in VC environment and create and object and directly reference the required function.

    If u need any further clarifications please state so.
Regards,
VBS
0
 

Author Comment

by:AM15
ID: 9862178
hi VBS,

Thanks for the reply but I didn't understand it completly. You mean to say that I need to create a DLL in VC which will call the VBA functions or Create a DLL in VB with all the functions ? After I create the DLL I can just instantiate the object and use the functions right ? could u please explain the above points.

Thanks
AM
0
 
LVL 1

Accepted Solution

by:
vbs03 earned 200 total points
ID: 9864444
AM15
What i meant to say was create all the DLL in VB, this is because the VBA code can be directly translated to VB due to similar syntax. Now u can reference this DLL in VC.
IF this is not clear I could provide some more details.

Regards,
VBS
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10286171
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: vbs03 {http:#9864444}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question