Can a Visual BASIC Module standalone and be referenced?

S

Sean J. Miller

Question: Can modules and forms be separated from the Project file to allow
upgrading independently?

Details:
We are rapidly tailoring MS Project to meet our specific needs with Forms
and "easy button" features using Visual BASIC.

Things are going smoothly, however, when we want to update a Visual BASIC
Module, we are presently opening their files and copy-pasting over old code.

Ideally, we'd like to have the Visual BASIC features sitting external to the
files so that we can update versions of the Module/Forms without having to
hard code paste over old code in the individual schedule files.

Is this possible?

As always, thanks in advance.
Sean
 
J

John

Sean J. Miller said:
Question: Can modules and forms be separated from the Project file to allow
upgrading independently?

Details:
We are rapidly tailoring MS Project to meet our specific needs with Forms
and "easy button" features using Visual BASIC.

Things are going smoothly, however, when we want to update a Visual BASIC
Module, we are presently opening their files and copy-pasting over old code.

Ideally, we'd like to have the Visual BASIC features sitting external to the
files so that we can update versions of the Module/Forms without having to
hard code paste over old code in the individual schedule files.

Is this possible?

As always, thanks in advance.
Sean

Sean,
Actually you are not using Visual Basic. What you are using, based on
your description, is Visual Basic for Applications (VBA) and VBA is
embedded in the application. What you may want to use is the stand alone
version of Visual Basic (e.g. VB6, VB.net, or whatever it may be called
now).

However, in your next to last paragraph you state what would be ideal.
Normally the best way to contain VBA modules is in the Project Global
file. Modules and userforms do NOT need to reside within individual
Project files because of the exact "problem" you describe. By storing
the modules and userforms in an enterprise Global, (Project Server
configuration), or in a separate Global (stand alone versions of
Project), you can update the code or form in one place. Then it is a
"simple" matter of distributing that Global to all users.

Hope this helps.
John
Project MVP
 
S

Sean J. Miller

Thanks, John.

It is VBA we are using.

It sounds like we need to try the separate Global. I take it that this
means they will overright their existing Global.mpt files on their machine?
If not, is it possible to make their global be on a server directory?

Thanks,
Sean
 
J

John

Sean J. Miller said:
Thanks, John.

It is VBA we are using.

It sounds like we need to try the separate Global. I take it that this
means they will overright their existing Global.mpt files on their machine?
If not, is it possible to make their global be on a server directory?

Thanks,
Sean

Sean,
You're welcome.

I think you mean "overwrite" instead of "overright". Depending on how
customized each user's Global is, it may or may not be desirable to
overwrite the whole Global. Maybe all you need to do is to transfer the
content of the modules. This can be done manually or it can be automated
with VBA or a separate VB application during off-hours.

I don't use Project Server, but in that environment and in environments
that simply have Project loaded unto a Server (with appropriate server
licensing), the user's installation of Project pulls the Global from the
server. That is probably the best way to keep a controlled standardized
Global file for all users and updating the Global is extremely easy
because it's in one central place and only designated administrators can
change it. If you want more information on how to set this up, I suggest
you post to our sister newsgroup, microsoft.public.project.server, even
if you are not using Project Server. But if you do post, explain your
installation.

John
Project MVP
 
J

Jim Aksel

I believe Rod Gill's book on Programming MS Project with VBA covers how to
make a macro to update (install) multiple modules (Forms, Modules, etc.) into
a file. The code would need some tweaking but I believe it is a good place
to start.

Sorry, but that book is about 30 miles from me at the moment so I cannot
give you a specific reference until after the new year.
--
If this post was helpful, please consider rating it.

Jim

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top