My code in MS project VBA, in theory, doesn't do anything major.
It compares the tasks with each other, but it runs super slow.
One run through Temp lasts 15 secs. Try that with 1500-2000 tasks and the macro takes hours.
Sub Laczona()
Application.Calculation = xlManual
Application.ScreenUpdating = False
Dim Temp, Temp2 As Integer
For Temp = 1 To ActiveProject.Tasks.Count
For Temp2 = 1 To ActiveProject.Tasks.Count
If ActiveProject.Tasks(Temp).Text30 = ActiveProject.Tasks(Temp2).Text30 Then
If Temp <> Temp2 Then
ActiveProject.Tasks(Temp).Flag5 = 1
End If
End If
Next Temp2
MsgBox "Praca: " & Temp
Next Temp
MsgBox "Prace Laczone Uzupelnione"
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
End Sub
Addidional explanation:
The code runs in MS Project 2013. Its purpose is to check whether two tasks have the same text in field Text30. If that is the case, the code sets flag5 to 1.