Gantt view around actual date

I

iTinu

i'm working on a long term project. when i open the project file, the gantt
plot timescale starts at the project starting date (somewhen in 2005). what i
would like is to have a gantt plot upon opening of the file around the actual
date. is that possible?

alternatively, i would already be happy with a work-arond, e.g. i manually
zoom/scroll to the period i am interested in, as long as i get the same view
upon saving and opening of the file.
 
J

JulieS

Hello iTinu,

There are a couple of choices available. First is a more manual
process: open the file, press F5 to open the Go To dialog, tab to
the date field and type "today" (without quotes). That will scroll
the Gantt chart to the current date.

The other option is to place the code below in the Open event of the
file:

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

Save and close the file. When the file is opened, the code above
will automatically scroll the file to the current date.

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
 
I

iTinu

Hi JulieS,

Thank you for your quick answer. F5 is a good one. With the code, I had some
trouble (security settings on my work pc are a bit harsh and seem to dislike
makros and codes of any kind) - but seems to work as well.

What I still don't understand is that some project files keep the zoomed in
and scrolled in timescale upon saving/closing/reopening while others won't.
Any hint where I can change that?

iTinu
 
J

JulieS

Hi iTunu,

You're welcome for the answer. Glad to have helped and thanks for
the feedback.

To you question about why doesn't the change in view get changed --
I don't really know as I don't seem to have that difficulty. Try
selecting a task, use the Go (or Scroll) to selected task button on
the Standard toolbar. That should adjust the Gantt chart to show
the selected task. Save and close the file. When you re-open does
it show the same area in the Gantt?

Julie
 
I

iTinu

Hi Julie,

It does with some files, but not with the others. I guess it is a single
tick missing somewhere - but I can't find it.

Tinu
 
A

Andrew

Julie

The coding solution sounds really interesting - how would I add the code? In
easy steps please !

Andrew
 
J

JulieS

Hi Andrew,

Assuming you wish to place the code in a single Project file:

1. Open the file.
2. Go to Tools > Macros, Visual Basic Editor to open the VBE. (Alt +
F11 also works)
3. In the Project Explorer pane on the left, select the hierarchy
showing the current project.
4. Click on the icon that says "ThisProject (NameOfYourProjectHere)
5. Copy and paste the code below into the code pane on the right
side of the VBE:

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

6. Choose File > Close and Return to Microsoft Project.
7. Save and close your file.
8. Re-open and the file should automatically scroll to the current
date.

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
 

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