Hey Guys,

I have the following scenario :

I manage a MS Project document with many projects and resources.
Besides the main projects there are several "disruptions" one resource has to work on (example Support or Vacation).
These disruptions lead to splits of the main project task.

Here is a small example of my MS Project document:


So if the disruption 1 of Person A (Vacation) suddenly takes 2 days instead of one I have to manually change the split of the Project Task.
No imagine this list is 500 lines long. And something changes every 2 days.

What I want to accomplish with VBA is a script that automatically performs the followings steps

What should the script do:
- Per Resource
- Taking project dependencies and sequences into account

1. Script finds everything that is not project (example: Vacation).
2. Script deletes all splits of main project (starting today - not in the past).
3. Script then re-splits the main project (adds new disruptions) taking disruptions into account.

It would be super awesome if you guys could help me!
Cheers Jay

PS: Please only send code and no files with macros in them. I am not allowed to open files with macros in the office.

The only thing I managed to accomplish so far is an automated split using input of a message box.

Sub CreateSplit()
Dim WhichTask As Long
Dim SplitFrom As Variant, SplitTo As Variant

WhichTask = InputBox("Enter the ID of the task you would like to split:")
SplitFrom = InputBox("Enter the date for the start of the" & _
" split: " & vbCrLf & "Example: 14.06.17 08:00")
SplitTo = InputBox("Enter the date for the end of the split:" & _
vbCrLf & "Example: 14.06.17 08:00")

ActiveProject.Tasks(WhichTask).Split SplitFrom, SplitTo
End Sub