Using SetField ???

G

Glenn

I want to insert data into a tasks custom field using SetField. Is this the
correct method to use or should I be using something else?

Using the Object Browser, I find SetField and press F1 for help.
Unfortunately there are no example code snipets so I am not sure of the
correct syntax.

Here's my educated guess...

Dim t as Task
t.Setfield (pjTaskNumber1, 1)

.... oh well, it bombs out...
 
J

John

Glenn said:
I want to insert data into a tasks custom field using SetField. Is this the
correct method to use or should I be using something else?

Using the Object Browser, I find SetField and press F1 for help.
Unfortunately there are no example code snipets so I am not sure of the
correct syntax.

Here's my educated guess...

Dim t as Task
t.Setfield (pjTaskNumber1, 1)

... oh well, it bombs out...

Glenn,
Yes the SetField Method can be used but it isn't normally the best
choice. From your failed code snippet it looks like you are trying to do
something with the spare field Number1 for tasks. If we have a better
idea of what you are trying to do instead of how you think you want to
do it, we could be of more help.

John
Project MVP
 
J

Jan De Messemaeker

How about t.number1=7.67?
I must have written between 10 and 20 KLOC of Project VBA and never used
setfields (nor getfields etc., by the way)
HTH
 

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