Results 1 to 1 of 1
2001-09-09, 00:03 #1wmjGuest
Referencing Fields Programatically (in VBA) (Project 2000)
I need to be able to change references to task fields that are being used on the fly (as a result of user input) and I don't want to have to hard code every possible option.
For example, How do I make the reference to ".Duration1" etc in the following code via VBA assuming that I have the field name in a string variable called strFieldName.
For Each oTask In ActiveSelection.Tasks
If Not oTask.Summary Then
oTask.Duration1 = oTask.Duration3 * oMinPercent
oTask.Duration2 = oTask.Duration3 * oMaxPercent
Thanks in advance.
PS I have cross-posted to the VBA forum as I wasn't sure which was the best/right place to put this.