G
Guest
All,
I received help in here yesterday regarding a non Excel question, hopefully
you can help again. There appear to be aton more users in here than in the
MS Project forum. My question is this....
I am trying to populate a Two Dimesnional Array, with the second Value in
the Array being a value determined by a method. The method is described
below, it is an MS Project method.
*****************************************
CustomFieldGetName Method
Returns the friendly name for a custom field.
Syntax
expression.CustomFieldGetName(FieldID)
expression Optional. An expression that returns an Application object.
FieldID Required Long. The custom field. Can be one of the following
PjCustomField constants:
pjCustomTaskText1, etc.
************************************************
So right now the second part of my Array looks like this...
Data2(1, 2) = CustomFieldGetName(pjCustomTaskNumber1)
Data2(2, 2) = CustomFieldGetName(pjCustomTaskNumber2)
Data2(3, 2) = CustomFieldGetName(pjCustomTaskNumber3)
etc.
This method works fine, but I have at least 100 of these fields. I'm just
trying to reduce the number of lines of code. So what i would like to do is
something like this
For i =1 To 100
Data2(i,2) = "CustomFieldGetName(pjCustomTaskNumber" & i & ")"
Next
Obviously though, once I do this it fills the Array with the text
"pjCustomTaskNumber1" rather than the returned value.
Any help would be greatly appreciated.
DMS
I received help in here yesterday regarding a non Excel question, hopefully
you can help again. There appear to be aton more users in here than in the
MS Project forum. My question is this....
I am trying to populate a Two Dimesnional Array, with the second Value in
the Array being a value determined by a method. The method is described
below, it is an MS Project method.
*****************************************
CustomFieldGetName Method
Returns the friendly name for a custom field.
Syntax
expression.CustomFieldGetName(FieldID)
expression Optional. An expression that returns an Application object.
FieldID Required Long. The custom field. Can be one of the following
PjCustomField constants:
pjCustomTaskText1, etc.
************************************************
So right now the second part of my Array looks like this...
Data2(1, 2) = CustomFieldGetName(pjCustomTaskNumber1)
Data2(2, 2) = CustomFieldGetName(pjCustomTaskNumber2)
Data2(3, 2) = CustomFieldGetName(pjCustomTaskNumber3)
etc.
This method works fine, but I have at least 100 of these fields. I'm just
trying to reduce the number of lines of code. So what i would like to do is
something like this
For i =1 To 100
Data2(i,2) = "CustomFieldGetName(pjCustomTaskNumber" & i & ")"
Next
Obviously though, once I do this it fills the Array with the text
"pjCustomTaskNumber1" rather than the returned value.
Any help would be greatly appreciated.
DMS