none
MS Project: start a task on the next business day RRS feed

  • Question

  • Hello,

    In a MS Project schedule where I use resources, I want that some tasks start only the next business day at 8:00.

    e.g:

    A resource is working on a task at 40%. The task duration is 5 days and starts on Monday the 5th of January 8:00. This resource ends its work on Wednesday the 25th January at noon.

    How can this resource start its next task automatically the day after (i.e Thursday the 26th at 8:00)

    NB: I've set up the calendar schedule 5 days a week, work hours 8:00 - 12:00 and 14:00 - 18:00

    Thanks !

    Thursday, October 27, 2016 11:56 AM

All replies

  • Hi,

    Try using Task constraint as 'Finish to Start' on Task 2 with .5day lag to achieve your requirement.

    Set Task 1 as a predecessor for Task 2 and on Task 2 enter a lag of .5days. Refer to the screenshot below for example. Hope it helps.

    Regards,

    Sudhir



    Thursday, October 27, 2016 4:29 PM
  • floset,

    This scenario has been presented several times over the years in this forum. There are a couple of approaches.

    One is to create a separate milestone task with a unique calendar that starts and ends at 8:00AM each day. Linking that milestone between the two tasks will force the successor task to start at 8:00AM regardless of when the predecessor finishes.

    The second approach is to use VBA. This is a macro I wrote a few years back to start a successor task on a specific day but it can easily be adapted to do what you want.

    John

    'This macro ensures all selected tasks can only be started on a Monday or Friday
    '   at the default project start time
    '   Tasks are selected by setting Flag1. Note: this procedure does leave a
    '   start-no-earlier-than constraint on all shifted tasks
    'written by John 12/2/14 7:00 pm
    Dim t As Task
    Dim EndTime As String, StartTime As String, ProjCal As String
    Dim WkD As Integer, DOffest As Integer
    Dim OFlag As Boolean
    Dim DayDate As Date
    Sub NextMonOrFri()
    'cycle through each task
    ProjCal = ActiveProject.Calendar
    For Each t In ActiveProject.Tasks
        'skip over blank lines
        If Not t Is Nothing Then
            'only look at Start time of non-summary tasks
            If t.Summary = False And t.Flag1 = True Then
                'find default start and end times for this task
                OFlag = False
                WkD = Weekday(t.Start)
                'determine the default start time for this project
                StartTime = ActiveProject.BaseCalendars(ProjCal).WeekDays(WkD).Shift1.Start
                'determine required shift in start time based on current start
                If WkD = 4 Or WkD = 7 Then DOffset = 2: OFlag = True
                If WkD = 5 Or WkD = 11 Then DOffset = 1: OFlag = True
                If WkD = 3 Or (6 And (Hour(t.Start) <> Hour(StartTime))) Then DOffset = 3: OFlag = True
                If WkD = 2 And (Hour(t.Start) <> Hour(StartTime)) Then DOffset = 4: OFlag = True
                'shift the task start to the next Monday or Friday at the default start time
                If OFlag = True Then t.Start = DateValue(DateAdd("d", DOffset, t.Start)) & " " & StartTime
            End If
        End If
    Next t
    End Sub

    Thursday, October 27, 2016 4:37 PM