Programming macros - specific scenario

N

NewProjDev

I am looking for help programming macros with the following functionality:

1) I want to be able to modify the value in a custom field on multiple
tasks. For example, I have a custom date field called RDate. I want to select
multiple tasks (or use a macro and update all tasks in the project) to a new
date. Can someone help me with what the programming logic that would be in
the macro or how I can accomplish updating the value in a custom field on
multiple or all tasks?

2) After the user updates the RDate, I want the programming to automatically
update another custom date field, FDate, based on the value in a custom
Number1 field. The custom Number1 field has number of weeks as a round
number. I want to subtract the number of weeks (displayed in Number1 field)
from the date in RDate and based on that, set the new FDate.

I will continue to search this forum, but any help is sincerely appreciated.
 
J

Jan De Messemaeker

Hi,

1. Either

Dim Job as task
For each Job in activeproject.tasks
if not job is nothing then

....... your code

end if
next job

Or

Dim Job as task
For each Job in activeselection.tasks
if not job is nothing then

....... your code

end if
next job

2.
fdate=vba.dateadd("ww",numberofweeks,rdate)

HTH
--
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