jump,
Depending on how the code is structured, you may or may not need to pass
parameters. Some people write very modular code where code is
partitioned into small pieces as private subs and functions. Parameters
are passed in the call line. Other people (i.e. myself) tend to write a
single procedure with many modular sections. In this type of code
parameters and variable generally don't need to be passed.
I suggest you check a couple of resources for more information. First
take a look at the VBA help file and read up on "working between
applications". You can also go to the MVP website at:
http://www.mvps.org/project/links.htm
and look for the link at the bottom of the page to: "Project 98 Visual
Basic Environment Training Materials". Even though it says "Project 98"
it is equally applicable to all current versions of Project and is an
excellent resource.
I tend to write a lot a macros that interface Project with Excel
although as long as an application supports VBA, running one app from
another is pretty straightforward. Although I've never used them, I
understand VB.net and "C" can also be used to interface Project and
other apps.
For an example of code that runs Excel from Project, take a look at Jack
(the king) Dahlgren's website at:
http://masamiki.com/project/macros.htm
He has several nice examples of VBA code including one that interfaces
Project and Excel ("export hierarchy to Excel").
Hope this helps.
John
Project MVP