B
Buster
I would like to loop through the following code, each time substituting
pjtask with pjresource, then pjassignment.
How do I loop around this code and insert the variables one at a time.
===============================================
myType = "Finish"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 10
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i,
pjTask)) <> "NA" Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
MsgBox usedfields
pjtask with pjresource, then pjassignment.
How do I loop around this code and insert the variables one at a time.
===============================================
myType = "Finish"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 10
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i,
pjTask)) <> "NA" Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
MsgBox usedfields