Solved

How to call a Visual Basic function from .NET

Posted on 2004-09-20
5
205 Views
Last Modified: 2013-11-25
Hello experts,

From .NET, I want to call a function from Visual Basic. How can I do this? Please help.

Thanks a lot,
codelearner
0
Comment
Question by:codelearner
5 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 125 total points
ID: 12109509
If you want to call VB from managed code, you can do this exactly by the same way as from VB client. Add reference to VB Dll to the project, create VB class instance and call it's methods.
To call VB from unmmanaged C++ you need to implement COM client code. See #import precompiler directory.
0
 
LVL 6

Assisted Solution

by:Svetlin_Panayotov
Svetlin_Panayotov earned 125 total points
ID: 12120458
Or if your function is in VB (not VB.NET) you must export it as COM.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

22 Experts available now in Live!

Get 1:1 Help Now