Solved

How to call a Visual Basic function from .NET

Posted on 2004-09-20
5
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem updating Access table using VB code 8 59
What the difference between blend and Visual Studio 3 391
VS2015 Redefinition errors 4 101
Need some help with design 17 44
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 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