Problem in vba

J

jman

I need to programmatically sort the tasks in a Project 2003 document, by
resource name and priority. First, I recorded a macro which did it, but I
have a little problem, since I use Project in Spanish. When I record the
macro, I get the following:

Sort Key1:="Nombres de los recursos", Ascending1:=True, Key2:="Prioridad",
Ascending2:=True, Renumber:=False

The problem is that I need to send this document to Germany, where it will
be opened with Project in German, so the "Nombres de los recursos" and
"Priority" identifiers will not be recognized. Believing it should be a
language issue, I tried with the following:

Sort Key1:="Resource names", Ascending1:=True, Key2:="Priority",
Ascending2:=True, Renumber:=False

but Project doesn't recognize "Resource names". "Priority" works just fine.
I have no English version of Project 2003 at hand, so I guessed if someone
with one available could record the same macro and tell the result.

Thanks in advance.
 
J

John

jman said:
I need to programmatically sort the tasks in a Project 2003 document, by
resource name and priority. First, I recorded a macro which did it, but I
have a little problem, since I use Project in Spanish. When I record the
macro, I get the following:

Sort Key1:="Nombres de los recursos", Ascending1:=True, Key2:="Prioridad",
Ascending2:=True, Renumber:=False

The problem is that I need to send this document to Germany, where it will
be opened with Project in German, so the "Nombres de los recursos" and
"Priority" identifiers will not be recognized. Believing it should be a
language issue, I tried with the following:

Sort Key1:="Resource names", Ascending1:=True, Key2:="Priority",
Ascending2:=True, Renumber:=False

but Project doesn't recognize "Resource names". "Priority" works just fine.
I have no English version of Project 2003 at hand, so I guessed if someone
with one available could record the same macro and tell the result.

Thanks in advance.

jman,
I suspect you are getting an error because you are trying to perform the
sort on a non-task view. In other words, if you are running the macro
with the Resource Sheet view as the active view, you will get an error
because the Resource Names field doesn't exist for resources and neither
does the Priority field.

However, I've never worked with Project across languages so I can't say
exactly what will happen if you send your German friends an English
language macro. But to answer you question, the following code works
fine with the English language version of Project.
Sort Key1:="Resource names", Ascending1:=True, Key2:="Priority", _
Ascending2:=True, Renumber:=False

John
Project MVP
 
J

Jan De Messemaeker

You're absolutely right, sorry, I did misread the question
But Resource Names works perfectly for me!
 
J

jman

Jan De Messemaeker said:
You're absolutely right, sorry, I did misread the question
But Resource Names works perfectly for me!

That's my problem, it doesn't work for me. If I do it in Spanish, it works
like a charm, but it doesn't when I use "Resource Names". There must be
something I'm missing.

Thanks anyway for your time.
 
J

Jan De Messemaeker

Hi,

What exactly happens?
Don't forget, it treats Resource Names like a text field thus
Peter;Paul
is always sorted before
Peter;Paul;AndMary
but after
Paul;Peter

Moreover.. do you have Keep outline Structure off?
HTH
 
J

jman

Jan De Messemaeker said:
Hi,

What exactly happens?
Don't forget, it treats Resource Names like a text field thus
Peter;Paul
is always sorted before
Peter;Paul;AndMary
but after
Paul;Peter

Moreover.. do you have Keep outline Structure off?
HTH

When I try to sort by Resource Names, I just get a run-time error, which
states that the parameter value ("Resource Names" in this case) is invalid.
To avoid the run-time error, I must substitute "Resource Names" with its
equivalent in Spanish ("Nombres de los recursos"), which I don't think is a
good solution, since the file I'm working with will be used in Germany,
where the users will most likely be using German or English versions of
Project.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top