Solved

How to call a Visual Basic function from .NET

Posted on 2004-09-20
5
233 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

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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