Solved

How to use Visual Basic code from VC++

Posted on 2003-11-26
5
347 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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 …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now