Option Explicit 'Macros to Remove contraints from tasks that are kept in place by logic 'This sets the tasks to have a constraint type of 0 which is "As Soon As Possible" 'You can reverse it by running Restore_NonLogic_Contraints 'Copyright Jack Dahlgren 4/17/00 Sub Remove_NonLogic_Constraints() Dim ProjTasks As Tasks Dim ProjTask As Task Dim TaskDeps As TaskDependencies If MsgBox("This Macro will remove All Constraints from tasks that have predecessors. Do you want to continue?", vbYesNo) = vbNo Then End Set ProjTasks = ActiveProject.Tasks For Each ProjTask In ProjTasks 'these if statements step through all tasks in the project If Not (ProjTask Is Nothing) Then 'this handles blank line in the file If ProjTask.Summary = False Then 'this handles summary tasks which are only allowed to be fixed duration If ProjTask.ExternalTask = False Then 'this handles external tasks ProjTask.Date1 = "" 'Clears the field we use to restore original constraint date ProjTask.Number15 = 0 'Clear the field we use to restore constraint type If ProjTask.TaskDependencies.Count > 0 Then 'selects tasks with 1 or more dependencies ProjTask.Date1 = ProjTask.ConstraintDate 'Stores restore data into fields ProjTask.Number15 = ProjTask.ConstraintType 'Stores restore data into fields ProjTask.ConstraintType = 0 'Sets task to as soon as possible End If End If End If End If Next ProjTask End Sub 'Macro to Restore contraints that were erased by the Remove_NonLogic_Contraints() macro 'This sets resets the tasks to have their original constraint types and dates 'Copyright Jack Dahlgren 4/17/00 Sub Restore_NonLogic_Contraints() Dim ProjTasks As Tasks Dim ProjTask As Task Dim TaskDeps As TaskDependencies If MsgBox("This Macro will restore All Constraints for tasks that have predecessors. Do you want to continue?", vbYesNo) = vbNo Then End Set ProjTasks = ActiveProject.Tasks For Each ProjTask In ProjTasks 'these if statements step through all tasks in the project If Not (ProjTask Is Nothing) Then 'this handles blank line in the file If ProjTask.Summary = False Then 'this handles summary tasks which are only allowed to be fixed duration If ProjTask.ExternalTask = False Then 'this handles external tasks If ProjTask.TaskDependencies.Count > 0 Then 'Selects only tasks with dependencies ProjTask.ConstraintType = ProjTask.Number15 'restores data from storage fields ProjTask.ConstraintDate = ProjTask.Date1 'restores data from storage fields End If End If End If End If Next ProjTask End Sub