C
cr113
I've written lots of code in Excel but I need help getting started in
Project. I need to find the row that contains a certain value in a
given field and make a change to another field in that row.
Suppose I want to find the row where field Text1="abc" and then change
field Name to "123". This piece of code will work unless the value is
not found. I got this from recording a macro.
Find Field:="Text1", test:="equals", Value:="abc", Next:=True,
MatchCase:=False
SelectTaskField Row:=0, Column:="Name"
SetTaskField Field:="Name", Value:="123"
Is there a better way to do this? I'd prefer to specify an object when
writing code. I don't like using methods out of the blue like "Find"
and "SelectTaskField". I don't know what the main objects are in
Project.
For example in Excel I use code like this:
Dim objSheet as Worksheet
set objSheet = Worksheets(1)
objSheet.Cells(1,1) = "abc"
Any help is appreciated! I'm using Project 2007.
Project. I need to find the row that contains a certain value in a
given field and make a change to another field in that row.
Suppose I want to find the row where field Text1="abc" and then change
field Name to "123". This piece of code will work unless the value is
not found. I got this from recording a macro.
Find Field:="Text1", test:="equals", Value:="abc", Next:=True,
MatchCase:=False
SelectTaskField Row:=0, Column:="Name"
SetTaskField Field:="Name", Value:="123"
Is there a better way to do this? I'd prefer to specify an object when
writing code. I don't like using methods out of the blue like "Find"
and "SelectTaskField". I don't know what the main objects are in
Project.
For example in Excel I use code like this:
Dim objSheet as Worksheet
set objSheet = Worksheets(1)
objSheet.Cells(1,1) = "abc"
Any help is appreciated! I'm using Project 2007.