Link to home
Start Free TrialLog in
Avatar of JasonJasonJasonJason
JasonJasonJasonJason

asked on

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

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.
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of JasonJasonJasonJason
JasonJasonJasonJason

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial