Adding values of two columns, then deleting the value in the first

G

Greg

I have created a custom column (Input_Hours) where, using another tool, I
will update the hours resources have worked on a task. What I want to happen
is for the value in 'Input_Hours' to add to the 'Actual Work' column, then
erase the value in 'Input_Hours'.
I can get close to this in a macro, but I'm not able to incrementally
increase the value Actual Work, and not accross all tasks at once. I also
tried to modify the VB script the macro created, but am not a programmer. On
another track, I'm pushing for our IT department to install the Enterprise
edition, but that's not going to happen anytime soon. Need a fix for the
meantime.

Any ideas??
 
J

Jan De Messemaeker

The macro code should look about like this (suppose your hours are in
Number1 field)

for each Job in activeproject.tasks
if not Job is nothing then
job.actualwork=job.actualwork+(60*job.number1)
job. number1=0
end if
next job
Hope this helps,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
G

Greg

Thanks Jan!

I'm getting a "Type Mismatch" error on the
job.actualwork=job.actualwork+(1*job.text1)

I changed the 'number1' to 'text1', since that's the custom column I
modified. Now that I'm typing this.. I'm wondering if the column I choose is
only looking for text, and not an interger? Could that be it? Maybe..

I'll keep working on it. If I can't get past that error I'll reply again
and ask for some more help. Many thanks for such a speedy recommendation.
 
J

Jan De Messemaeker

Hi,

Use 60* val(job.text1)
is the time you give in text1 in minutes?
You said hours in your first psot so you have to multiply by 60
Project stores everything in minutes.

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 

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