Solved

VB.NET Access sub or function between projects in a solution

Posted on 2011-03-14
3
286 Views
Last Modified: 2012-05-11
I have a VB.NET 2008 solution that has multiple projects in it.  I need to be able to call a sub that resides in Project A from Project B.  I also need to be able to pass a string to that sub in Project A when I call it from Project B.

Is this possible?  Hopefully it makes sense.  Thanks for the suggestions.
0
Comment
Question by:JasonJasonJasonJason
  • 2
3 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35134757
What types of projects are these ?
Usually you would just add a reference to project B from Project A.
Then you would call the sub in thee same way as function but adding the project name and possibly class name infrom of the function/subname i.e.

projectb.classa.suba()

you can obviously pass parameters into this function call in the same way as for a normal function call.
0
 

Author Comment

by:JasonJasonJasonJason
ID: 35134834
i added the reference to the project a from project b.  

In project B when i type projecta.form1. it does not list the subs.

do you know why it would do this?
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 35134934
Have a look at this article it should help : http://visualbasic.about.com/od/usingvbnet/l/aa080703a.htm
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 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