MACRO for REMOVING SPLITS in the tasks...

K

Kendra

Hi,

When I leveled my schedule, I chose the option to "Leveling can create split
in remaining work" option and now, there are splits over 100+ tasks among 13+
resources & the file got saved subsequently during auto save, thus can do
undo which I now have turned off auto-save as well.

Removing them manually by dragging is painfully slow. Obviously I wouldd
think twice before I select this option next time.

Does anyone have a macro for this?

Thanks,
Kendra
 
J

John

Kendra said:
Hi,

When I leveled my schedule, I chose the option to "Leveling can create split
in remaining work" option and now, there are splits over 100+ tasks among 13+
resources & the file got saved subsequently during auto save, thus can do
undo which I now have turned off auto-save as well.

Removing them manually by dragging is painfully slow. Obviously I wouldd
think twice before I select this option next time.

Does anyone have a macro for this?

Thanks,
Kendra

Kendra,
This little macro should do what you need. Disclaimer: I just wrote it
and only tested it on a very simple file. Spot check your end result.
It's possible I missed some subtle issue.

Sub Remove_Splits()
Dim i As Integer
Dim Temp As Single
Dim t As Task
Dim s As SplitPart
For Each t In activeproject.Tasks
If Not t Is Nothing And t.SplitParts.count > 1 Then
Temp = t.Duration
For i = t.SplitParts.count To 2 Step -1
t.SplitParts(i - 1).Finish = t.SplitParts(i).Start
Next i
t.Duration = Temp
End If
Next t

End Sub

Hope this helps.

John
Project MVP
 
K

Kendra

Wow, THANK U JOHN!!!
Have a nice weekend!

I will test it out on a 2nd copy of the schedule.

Best,
Kendra
 
P

Prasad

Wow, THANK U JOHN!!!
Have a nice weekend!

I will test it out on a 2nd copy of the schedule.

Best,
Kendra


Kendra,

Did you understand what John's VBA code does?

Prasad
 
J

John

Kendra said:
Wow, THANK U JOHN!!!
Have a nice weekend!

I will test it out on a 2nd copy of the schedule.

Best,
Kendra

Kendra,
You're welcome and thanks for the feedback.

John
Project MVP
 
K

Kendra

Prasad,

No not really, but I thought it would be worth a shot to test it out on a
test copy of the schedule file.

Why do you ask?

Best,
Candra
 
P

Prasad

Prasad,

No not really, but I thought it would be worth a shot to test it out on a
test copy of the schedule file.

Why do you ask?

Best,
Candra


Candra,

John's code is simply extending the split parts of a task (except the
last part) to cover the time gaps between successive parts. In my
view, this code does not do resource leveling without task splitting
as you wanted.

If I have the list of all tasks along with durations, dependency
relations and resource assignments, and resource allocations are 100%
always, then I can freely perform resource leveling without task
splitting (not manually) for you even if the number of tasks is in
thousands and the number of resources is in hundreds with any weekly
calendars for resources.

Regards,
Prasad ( www.optisol.biz )
 

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