C
Clara11
Hi all
I am trying to read trough my task looking for a certain value in an
enterprise task outline code. When conditions are meet I want to select
the task - copy it - open named project and pastespecial (linked task)
at the end of the project. Everything works fine except - I can't get
the task that meets the criteria to be selected. Here is my code
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
strDevSysName = t.EnterpriseOutlineCode6
If t.EnterpriseText21 = "C25" Then
**How do I select this task?**
SelectRow - this selects the active row not the task
from the loop
EditCopy
FileOpen Name:="<>\" & strDevSysName & " CAPA
Plan.Published"
ViewApply Name:="Deviation View"
intTCount = ActiveProject.Tasks.Count
SelectRow intTCount + 1
EditPasteSpecial Link:=True, Type:=2,
DisplayAsIcon:=False
ViewApply Name:="GMP View"
FileSave
FileClose
WindowActivate WindowName:="<>\MICS Central Deviation
Plan.Published"
End If
End If
Next t
everything else work fine any and all help - suggestions is greatly
appreciated
thanks
Clara
I am trying to read trough my task looking for a certain value in an
enterprise task outline code. When conditions are meet I want to select
the task - copy it - open named project and pastespecial (linked task)
at the end of the project. Everything works fine except - I can't get
the task that meets the criteria to be selected. Here is my code
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
strDevSysName = t.EnterpriseOutlineCode6
If t.EnterpriseText21 = "C25" Then
**How do I select this task?**
SelectRow - this selects the active row not the task
from the loop
EditCopy
FileOpen Name:="<>\" & strDevSysName & " CAPA
Plan.Published"
ViewApply Name:="Deviation View"
intTCount = ActiveProject.Tasks.Count
SelectRow intTCount + 1
EditPasteSpecial Link:=True, Type:=2,
DisplayAsIcon:=False
ViewApply Name:="GMP View"
FileSave
FileClose
WindowActivate WindowName:="<>\MICS Central Deviation
Plan.Published"
End If
End If
Next t
everything else work fine any and all help - suggestions is greatly
appreciated
thanks
Clara