Re: except tasks from sorting
- From: "uli" <ulrichroos@xxxxxxxx>
- Date: 23 Nov 2006 05:49:36 -0800
Hi Jack,
firstly thanks for your efforts. Let me clarify my first assumption (to
simplify the problem assume that we have only one level of tasks (only
level one-tasks)):
The user drags a task and drops it on an arbitrary position - id est a
position out of any sort key. If this happens after ore without any
sorting, we have no problem: the before moved task stays at its
position.
But we will sorting subsequently.
Therefore we need a critera (or via code testable event or state) not
to sort the formentioned arbitrary moved task - we will sort only the
tasks without "not to sort" criteria.
To sort that way, "not to sort" tasks collecting on the beginning or
end of all tasks will be easy - and I understand your code-example to
work that way (you are not angrily, that I say, this of your code will
be easy...)
But the challenge is, to find an vba-code, which sorts ONLY "allowed"
tasks and "forgets" "not to sort" tasks - they stay at their before
(relative) position.
So I assume there must be ms-project code like only sorting the
"active.region" "current.region" "selection" ore analogous, but I
couldn't find the right syntax or logic or ansatz.
So perhaps I had to post the problem thematically in the developers
group? yours Uli
Jack Dahlgren schrieb:
A simple answer would be use another field.
Your code would copy the text field to the new field first - EXCEPT for the
ones with a flag indicating that they should not be sorted. For those put
something guaranteed to be first in a sort order. I usually use the
underscore _ for this. Then sort on the new column. When you are done, clear
the field so you can use it again.
the code would look something like this:
if not task.text1 = "NO SORT" then
task.text2 = task.text1
Else task.text2 = "_not sorted"
-Jack Dahlgren
"uli" <ulrichroos@xxxxxxxx> wrote in message
news:1164209890.651264.85470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello fellow sufferers (maybe from project, maybe from this
question...)
(Project 2002 and 2003) I'm sorting tasks via vba, sort key is a Text
Field (so good as any other field). Sorting is no problem. But I will
except some manually to mark tasks from (repeated) sorting (for example
tasks with field flag1 "no").
I read a lot of it in the web and newsgroups, so many times I found the
hint to filtering the tasks (with autofilter or other filters) before
sorting. These hints assure: only the filtered part will be sorted.
But I never found any difference between filtering before sorting or
not: after filtering, then sorting, and then refiltering always all
tasks are sorted by the sorting key.
So the question is: Don't I understand this hints (filtering before
sorting) wrong - or doesn't this work?
So it stays my problem: How can I except some tasks from sorting
(whatever position ms-project the "non sorted" tasks then leave - but
not a position via sort key)
greetings uli from Germany
.
- References:
- except tasks from sorting
- From: uli
- Re: except tasks from sorting
- From: Jack Dahlgren
- except tasks from sorting
- Prev by Date: Re: Problem with Cost Data in Project
- Next by Date: Re: except tasks from sorting
- Previous by thread: Re: except tasks from sorting
- Next by thread: Re: scheduling tasks in MS Project
- Index(es):
Relevant Pages
|
|