Re: except tasks from sorting



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


.



Relevant Pages

  • Re: A Fast sorting algorithm for almost sorted data
    ... far my compressor has potential but is nowhere near ready. ... It does however make heavy use of sorting. ... which I am currently calling Run sort. ... entire selected run can be added to the sorted output array. ...
    (comp.compression)
  • Re: Solution for sorting an array alpha-numerically
    ... strings up into groups and sorting the groups seperately, ... > so that numeric and alphabetic data sort as seperate groups. ... To the same project as the web page, add the class AlphaNumCompare() ...
    (microsoft.public.dotnet.general)
  • Re: how fast can I sort on mainframe (using DFSORT)?
    ... Since I joined the team as the performance lead a couple years ago, ... Frank now defers these types of questions to me. ... I have been out of the sorting business for a while, ... Writing to sort work files should not be the problem, ...
    (bit.listserv.ibm-main)
  • Re: When random isnt random
    ... >> (and, if there is not one already, a Sorting Unit). ... TList has a Sort method. ... Try it with a TList and in the compare function ... There seems to be, sometimes, a requirement for a Shuffle that leaves ...
    (borland.public.delphi.language.objectpascal)
  • Re: Strange sorting behaviour in forms Problem Solved
    ... I found the source of the strange sorting. ... When I sorted with all 4 visible, I saw that the sorting was in fact being done correctly. ... They can also sort the data on any of the columns in the datasheet, using a custom menu bar, with the appropriate MS toolbar items for sorting and filtering. ...
    (microsoft.public.access.forms)