I am trying to have project 2003 open up to current day by default

J

Jim Aksel

Place the following code in your Global MPT in the Microsoft Project Objects
folder (ThisProject):

Private Sub Project_Open(ByVal pj As Project)
EditGoTo Date:=Now()
'Name any additional filters you want applied here.
'This will show only summary tasks if uncommented:
'FilterApply Name:="Summary Tasks"
End Sub
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

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

MGB

Sounds promising, I need a few more details to get it going I think. I found
the Global.mpt file and opened it. It operated like a "program" called
organizer. I did not see Microsoft Project Objects folder. The file
structure where I found Global.mpt is "C:\Program Files\Microsoft
Office\OFFICE11\1033". I also tried opening the file global.mpt with a
couple of simple editors that did not help either.
 
M

MGB

Thanks,

I opened VBE pasted:

folder (ThisProject):

Private Sub Project_Open(ByVal pj As Project)
EditGoTo Date:=Now()
'Name any additional filters you want applied here.
'This will show only summary tasks if uncommented:
'FilterApply Name:="Summary Tasks"
End Sub

into module 1 and then saved it. it did not work exactly as I would have
guessed so... I went back in and deleted out, "folder (ThisProject):" and
resaved it. I was not sure if that line was working or edited for my file
correctly. It didnt seem to fit with the rest of the lines. My project file
still opens up a couple of years too early, but if I click on the scroll bars
once it jumps to current time. Which is ok, beats scrolling until I see the
current date. If I overlooked something I would appreciate any
clarification.
 
J

JulieS

Hello MGB,

You are correct. You do not want anything before the line that begins
with
Private Sub Project_Open

in the window. You also do not need any of the lines that are commented
(being with a ' ) in the code either.
The basic code you need:

Private Sub Project_Open(ByVal pj As Project)
EditGoTo Date:=Now()
End Sub

should run when the project file is opened, so I'm not sure why it
appears to only be working after you scroll. It's possible that it is
taking that long for the file to open so there is a delay in the code
running.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 
M

MGB

Thanks Julie,

Not sure why it is not auto-matically bumping to the current date, until
after I click the horizontal scroll bar once. It comes up shows ready, just
gotta click it once, which is much better than before thanks again.
 
J

JulieS

You're welcome. Glad to have helped.

Julie

MGB said:
Thanks Julie,

Not sure why it is not auto-matically bumping to the current date,
until
after I click the horizontal scroll bar once. It comes up shows
ready, just
gotta click it once, which is much better than before thanks again.
 
J

jlg

You're welcome. Glad to have helped.

Julie








- Show quoted text -

Julie,

I am an administrator for PS 2003 and have been trying to get this
open to current day by default working also.

1st, I tried to add it to my Global.MPT; I have those 3 basic lines +
a msg line stating 'this is from global mpt'.
So then I exited Project and went back in - I did not receive any msg
and it does not jump to the appropriate current date (I tried opening
many plans).

....i.e., I could not get it working.

2nd I added to a specific Project that I had opened; I have those 3
basic lines + a msg line stating 'this is from xxx Project'.
So then I exited Project and went back in to the project I added this
code to - I did successfully receive the msg and it does jump to the
appropriate current date.

3rd, I added it to Enterprise Global; again, I have those 3 basic
lines + a msg line stating 'this is from GET.'
So then I exited Project and went back in - I did receive both
messages - the one from the individual project and the one from GET
and it does jump to the appropriate current date. This occurs for
every plan i open.

I go into my Tool / Macros / Visual Basic Editor and look at
ThisProject (Global.MPT)
This Project (Global(+cached Enterprise)).

I see both sets of code + the accurate msg in both.

I just cannot figure out why I cannot get it working in the
Global.MPT. any insights???

thx....jlg
 
J

jlg

Julie,

I am an administrator for PS 2003 and have been trying to get this open to current day by default working also.

1st, I tried to add it to my Global.MPT; I have those 3 basic lines + a msg line stating 'this is from global mpt'.
So then I exited Project and went back in - I did not receive any msg and it does not jump to the appropriatecurrentdate(I tried opening many plans). ...i.e., I could not get it working.

2nd I added to a specific Project that I had opened; I have those 3 basic lines + a msg line stating 'this is from xxx Project'. So then I exited Project and went back in to the project I added this code to - I did successfully receive the msg and it does jump to the appropriate current date.

3rd, I added it to Enterprise Global; again, I have those 3 basic lines + a msg line stating 'this is from GET.'
So then I exited Project and went back in - I did receive both messages - the one from the individual project and the one from GET and it does jump to the appropriate current date. This (i.e., msg from GET and NOT the msg from the specific plan) occurs for every plan i open.

I go into my Tool / Macros / Visual Basic Editor and look at
ThisProject (Global.MPT)
This Project (Global(+cached Enterprise)).

I see both sets of code + the accurate msg in both.

I just cannot figure out why I cannot get it working in the Global.MPT. any insights???

thx....jlg
 
J

JulieS

I am an administrator for PS 2003 and have been trying to get this
open to current day by default working also.

1st, I tried to add it to my Global.MPT; I have those 3 basic lines +
a msg line stating 'this is from global mpt'.
So then I exited Project and went back in - I did not receive any msg
and it does not jump to the appropriate current date (I tried opening
many plans).
...i.e., I could not get it working.
2nd I added to a specific Project that I had opened; I have those 3
basic lines + a msg line stating 'this is from xxx Project'.
So then I exited Project and went back in to the project I added this
code to - I did successfully receive the msg and it does jump to the
appropriate current date.

3rd, I added it to Enterprise Global; again, I have those 3 basic
lines + a msg line stating 'this is from GET.'
So then I exited Project and went back in - I did receive both
messages - the one from the individual project and the one from GET
and it does jump to the appropriate current date. This occurs for
every plan i open.

I go into my Tool / Macros / Visual Basic Editor and look at
ThisProject (Global.MPT)
This Project (Global(+cached Enterprise)).

I see both sets of code + the accurate msg in both.

I just cannot figure out why I cannot get it working in the
Global.MPT. any insights???

thx....jlg
Hi jlg,

I do not use Project server (although I use Project Professional) so I
am on "guessing" ground here. I believe when you use Project Pro
connected to a server, when you launch Project Pro, you download the
Enterprise Global. So, my *guess* is that just placing the code in your
Global.mpt file the code was not triggered when you downloaded
Enterprise Global upon connection with the Server.

I can't test Enterprise Global here, but as an experiment I added the
code to my Global.mpt file with a message box to display "this is from
global." I exited project (to save Global). I opened a project file
from the operating system (double clicked on the file). The code
executed upon opening the file -- scrolled the Gantt chart to today --
and displayed the message -- twice -- once when Global was opened and
once when the file was opened.

I then added the code to a specific file in the open event and changed
the message to read "this is local". I saved the file and exited
Project. When I opened the file from the operating system, both pieces
of code ran -- first global displaying the "this is from global" message
and then displaying the "this is from local" message.

However, when I stayed in Project, closed the project with the code
locally and re-opened, I only got the "local" message.

I don't know if this answers your question but I'm afraid I can give the
definitive answer. My recommendation is that you appear to have it
working when the code is in Enterprise Global. I would delete it from
Global and just stay with Enterprise.

Possibly one of the folks who works with Project Server will weigh in
here as I can't give you the complete answer.

I hope this helps. Let us know how you get along.

Julie
 
J

jlg

<snip> Julie,












Hi jlg,

I do not use Project server (although I use Project Professional) so I
am on "guessing" ground here. I believe when you use Project Pro
connected to a server, when you launch Project Pro, you download the
Enterprise Global. So, my *guess* is that just placing the code in your
Global.mpt file the code was not triggered when you downloaded
Enterprise Global upon connection with the Server.

I can't test Enterprise Global here, but as an experiment I added the
code to my Global.mpt file with a message box to display "this is from
global." I exited project (to save Global). I opened a project file
from the operating system (double clicked on the file). The code
executed upon opening the file -- scrolled the Gantt chart to today --
and displayed the message -- twice -- once when Global was opened and
once when the file was opened.

I then added the code to a specific file in the open event and changed
the message to read "this is local". I saved the file and exited
Project. When I opened the file from the operating system, both pieces
of code ran -- first global displaying the "this is from global" message
and then displaying the "this is from local" message.

However, when I stayed in Project, closed the project with the code
locally and re-opened, I only got the "local" message.

I don't know if this answers your question but I'm afraid I can give the
definitive answer. My recommendation is that you appear to have it
working when the code is in Enterprise Global. I would delete it from
Global and just stay with Enterprise.

Possibly one of the folks who works with Project Server will weigh in
here as I can't give you the complete answer.

I hope this helps. Let us know how you get along.

Julie- Hide quoted text -

- Show quoted text -

Thanks, Julie, i do appreciate your comments (daily in fact!). I
reposted to server group also.... the reason this is important is
that only some of our PMs want the code to jump to current date ;
others do not. so if in global.mpt, of course, that can be
individualized.

take care...jlg
 
J

JulieS

jlg said:
Thanks, Julie, i do appreciate your comments (daily in fact!). I
reposted to server group also.... the reason this is important is
that only some of our PMs want the code to jump to current date ;
others do not. so if in global.mpt, of course, that can be
individualized.

take care...jlg

You're most welcome jlg and thanks for the feedback.

If only some of the PMs want the code to run have you considered
removing the code from the Open Event and creating a button that will
call the macro? That way PMs who want to run the code can through the
button and others can just ignore the button.

Good luck and let us know how you get along.

Julie
 

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