Change the value of an Enterprise Custom Field using VBA?

M

Mr. Entropy

Hi all,

I am attempting to change the value of an Enterprise Custom Field using VBA.
I am a definite newbie, but from what I've read so far, it seems like it
should be possible using setField. Could someone point me in the right
direction? I have included one of my attempts that errors out.

Thanks a lot,
Carl

Sub setProjectStatus()
' Macro setProjectStatus

Dim ts As Tasks
Dim t As Task
Set ts = ActiveProject.Tasks

Dim Name As String

Name = FieldNameToFieldConstant("Project Status")
Call t.SetField(Name, "On Hold")

End Sub
 
M

Mr. Entropy

I believe I've uncovered the answer. I'll post it here in case it's useful to
anyone else. "Project Status" is the name of a custom field and "In Progress"
is the value I'm setting.

Call
ActiveProject.ProjectSummaryTask.SetField(FieldNameToFieldConstant("Project
Status"), "In Progress")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top