Programmably select multiple tasks given their names

K

kevin

Hi
I would like to select multiple tasks (either their rows or the task name fields) on the task list. Most selection methods require row numbers, but all I know is the task names. Does anyone have any suggestions on how this can be achieved in VB

Thanks

-kevin
 
G

Guest

Is there some reason that you are selecting them? If it is just so that you
can perform an operation on them then you don't need to do a selection. Just
go through all of the tasks and perform your operation on each task that
meets your criteria If you are going to format them or something you could
just do a highlight filter or something similar.

-Jack


kevin said:
Hi,
I would like to select multiple tasks (either their rows or the task name
fields) on the task list. Most selection methods require row numbers, but
all I know is the task names. Does anyone have any suggestions on how this
can be achieved in VB?
 
K

kevin

Yes. I'm writing a standalone windows program in VB from which I create ms project application by
mspapp = CreateObject("MS Project"). I would like to keep both my application and MS Project open, and when the user is manipuating the data for certain tasks in my application, I would like the coorsponding tasks in MS Project window to be highlighted or selected so that the user is able to visually identify or browse the information about the tasks in MS Project (for example, the user can see the Gantt chart bars for the tasks as my application don't offer Gantt chart)

Hope this is clear

Thanks

-kevi
 
G

Guest

OK, that makes sense, but I'm afraid I only can figure out how to do a
highlight filter for multiple tasks.
It won't be a multiple selection.
Something like this:

Sub Macro1()
FilterEdit Name:="_highlightFilter", _
TaskFilter:=True, Create:=True, _
OverwriteExisting:=True, _
FieldName:="Name", _
Test:="contains", _
Value:="foo", _
ShowInMenu:=False, _
ShowSummaryTasks:=False
FilterApply Name:="_highlightFilter", Highlight:=True
End Sub


kevin said:
Yes. I'm writing a standalone windows program in VB from which I create ms project application by:
mspapp = CreateObject("MS Project"). I would like to keep both my
application and MS Project open, and when the user is manipuating the data
for certain tasks in my application, I would like the coorsponding tasks in
MS Project window to be highlighted or selected so that the user is able to
visually identify or browse the information about the tasks in MS Project
(for example, the user can see the Gantt chart bars for the tasks as my
application don't offer Gantt chart).
 
K

kevin

The FilterEdit approach is better than nothing. Unfortunately, it doesn't to multiple selection. Too bad all of the selection methods provided by MS Project only take row numbers

Thanks anyway

-kevin
 

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