J
Jim Aksel
I am attempting to write code that will examine the items in a
custom value list. For example, a custom list for Text2.
For each item in the list, I need to go do something depending on the value.
For now, I will just put up a message box.
The following code seems to be a start, but it will not run.
Public Sub generate()
On Error Resume Next
Dim counter As Integer
Dim result As VbMsgBoxResult
counter =
Application.ActiveProject.CustomFieldValueList(pjCustomTaskText2).Count
'Apparently No Count property?
Debug.Print (counter)
Dim j As Integer
Dim myString As String
For j = 1 To 4 'counter 'No work.
'idea is to use "counter" instead of 4
Debug.Print ("j=" & j)
myString =
Application.ActiveProject.CustomFieldValueListGetItem(pjCustomTaskText2,
pjValueListValue, j)
result = MsgBox(Str(j) & " " & myString, vbInformation)
Next
End Sub
Any ideas would be helpful.
custom value list. For example, a custom list for Text2.
For each item in the list, I need to go do something depending on the value.
For now, I will just put up a message box.
The following code seems to be a start, but it will not run.
Public Sub generate()
On Error Resume Next
Dim counter As Integer
Dim result As VbMsgBoxResult
counter =
Application.ActiveProject.CustomFieldValueList(pjCustomTaskText2).Count
'Apparently No Count property?
Debug.Print (counter)
Dim j As Integer
Dim myString As String
For j = 1 To 4 'counter 'No work.
'idea is to use "counter" instead of 4
Debug.Print ("j=" & j)
myString =
Application.ActiveProject.CustomFieldValueListGetItem(pjCustomTaskText2,
pjValueListValue, j)
result = MsgBox(Str(j) & " " & myString, vbInformation)
Next
End Sub
Any ideas would be helpful.