:
Thanks John, that is a great idea! it go much faster than before.
karoc,
You're welcome and thanks for the feedback.
John
Project MVP
:
:
My project does not allow add new sub task under some task,
but
cannot
forbid
the operation of insert new row, so I remove the blank rows
before
save
the
project, so do have a quickly way to remove the blank rows?
thanks!
karoc,
What I would probably do is to create a filter that isolates
all
blank
task rows. Then use SelectAll followed by a Delete. I don't
have
Project
open at the moment so there may be a few more details, but at
least
this
gives you a general approach.
Hope this helps.
John
Project MVP
Hi, John
Thanks. but the blank row cannot be filtered.
karoc,
Yeah, you're right. I forgot that blank lines are null objects.
OK, here's another approach. Sort by Task Name without keeping the
outline structure. Then find and select the last task with a
non-null
entry in the Name field. This will require you to look for an error
in
a
loop that looks at all tasks in the current active view (a null
task
object generates a runtime error so use the On Error Resume Next
code
structure to avoid halting execution when you hit the error). When
the
controlled error occurs, branch to code that selects the next row
through the end of the file (you can get that from the
ActiveProject.Tasks.Count Property). Once selected, those blank
rows
can
be deleted. Finally, re-sort by ID.
I don't have time to actually code this up and test it for you, but
it
should work unless someone else has a better approach.
Hope this helps.
John
Project MVP