Hi all, I'm looking for some help using VBA to delete rows in an MSP I own. There aretasks in my plan labelled as either "C" or "I" (as in Client or Internal) using a custom "text23" column. I'm currently having to manually delete, line by line those labelled "I" in order to send my client a sanitised version of the plan.
I'm not quite at the stage yet to write my own VBA, but I'm certainly able to administer it. does anyone have an idea as to how the code to perform this task should look?
.
Thanks Tom, this is really useful. Strangely I appear to have to run the macro a couple of times in order to delete all "I" tasks, but it beats doing it manually that's for sure! (my plan is 5k tasks long).
Also I agree with your advice regarding this method being slightly risky, and in all honesty I don't see any reason to hide anything from the client anyway, but I aint the boss! Ultimately I'm untertaking this task manually regardless, so I've ensured that no logic will be broken in the process, and now it's automated it can be done much quicker!
Thanks again,
Rob
Hi Rob,
Here's a simple procedure that does what you suggest for a simple project I tested it on.
Sub DeleteInternal()
Dim t As Task
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
If t.Text23 = "I" Then t.Delete
End If
Next t
End Sub