Solved

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

Posted on 2011-03-14
3
276 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 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

8 Experts available now in Live!

Get 1:1 Help Now