×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

calculated finish date

calculated finish date

calculated finish date

(OP)
I need to create a formula/macro to display finish dates in a column for a project using the "As Late As Possible" constraint while keeping the "As soon As Possible" constraint on the task. Can anyone help?  

RE: calculated finish date

Try inserting the column "Late Finish".

Hope this helps,
J Black
www.pmconnection.com

RE: calculated finish date

(OP)
Needed a different calculation for the late finish.  I got bunches of help on Tek-Tips.Com  Here is the link:

http://www.tek-tips.com/viewthread.cfm?qid=1396435&page=1

And the solution from tek-tips.com:

PDQBach (IS/IT--Management) 8 Aug 07 10:41  
You cannot apply an ASAP constraint while simultaneously applying an ALAP constraint -- it's like saying you can have the same popsicle be a grape popsicle and a fudgsicle simultaneously.
  
Mindy343 (TechnicalUser) 8 Aug 07 11:05  
I need to display a result that is similar to the "Late Finish Date" and can get it by using the "As Late As Possible" constraint and the late finish date column...the problem is that I need to keep the rest of the information as calculated with the "As Soon As Possible" constraint.

I hoped I could get some help writing a module to look at each task as ALAP, calculate the late finish date using that constraint and then display that result in a column...all without actually changing the constraint originally assigned to the task.
 
Mindy343 (TechnicalUser) 8 Aug 07 14:14  
Would it be possible to Change the constaint to ALAP then have the new late finish saved in a date column then change the constraint back to ASAP?
 I can Change the constraint with ---

Sub MakeALAP()
Dim T As Task
   
For Each T In ActiveProject.Tasks
    If T.Summary = False Then
        If T.ConstraintType = pjASAP Then
            T.Text1 = T
            T.ConstraintType = pjALAP
        End If
    End If
Next T

End Sub

and I can create a column "Date5" copy the Late Finish with ---

Sub MakeDate()
Dim T As Task
For Each T In ActiveProject.Tasks
    T.Date5 = T.LateFinish
    
Next T

End Sub

I assume I can rewrite the first 'sub' to change it back to ASAP but I don't know how to put it together and run it as a whole module.

Sorry if I'm not making sense...but my boss says it can be done and wants me to figure it out so I've spent all day looking things up and am about to explode!
 
 
PDQBach (IS/IT--Management) 9 Aug 07 11:06  
It looks to me as if you've done all the heavy lifting.

This code loops through the tasks, saves the current LateFinish, changes the ConstraintType to ALAP, saves the revised LateFinish, changes the ConstraintType back to the previous setting and moves to the next task.

Sub pdqbach()
Dim tsk As Task
Dim varConstraint As Variant

For Each tsk In ActiveProject.Tasks
    If Not tsk Is Nothing Then
        If Not tsk.Summary Then
            tsk.Date5 = tsk.LateFinish
            varConstraint = tsk.ConstraintType
            tsk.ConstraintType = pjALAP
            tsk.Date6 = tsk.LateFinish
            tsk.ConstraintType = varConstraint
        End If
    End If
Next
end sub

Not sure what else you need done.  Please advise.
 
 
Mindy343 (TechnicalUser) 10 Aug 07 11:29  
You're my hero!!!

Need another constraint change.  I also need any task with a desdline to change from ASAP to FNET before recording the revised Late Finish Date. Is this possible?

 
PDQBach (IS/IT--Management) 10 Aug 07 15:06  
You can fit this logic into the other code:

if tsk.Deadline < 100000 then ' There is a deadline date
    if tsk.ConstraintType = pjASAP then
        tsk.ConstraintType = pjFNET
        tsk.Date6 = tsk.Finish
        tsk.ConstraintType = pjASAP
    end if
else                          ' No deadline date
'
' do something else
'
end if

I'm curious ... what are you trying to accomplish with the code I've sketched out in this thread?

  
Mindy343 (TechnicalUser) 13 Aug 07 13:37  
My boss wants to be able to get a late finish schedule that works backward from the deadline date rather than the project finish date.  This is the only way I have found to get Project to calculate the results he wants to see but I just didn't have the expertise to put it into a single module.  Your code is right on! Thank you!  
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close