Relatoive Task Time

B

Bapu

Can a task's hours be based upon another task's hours?

We use a standard template for all new projects. We use a
formula that says "for every programming hour there are
1.5 Qa hours involved".

Is there a way that I can say the task hours is 150% of
it's predecessor's hours?

TIA,
 
G

Gérard Ducouret

Hello Bapu,
No, it's not possible in a simple interactive way.
But you could do it via a VBA procedure.

Gérard Ducouret
 
B

Bapu

Gerard,

I've not used VBA before. I am a "programmer" but lack any
VBA exeperince. Can you provide a simple VBA example (of
any type) so I can undertsnad the paradigm?

TIA,
 
G

Gérard Ducouret

Hello Bapu,
You go to the VisualBasic Editor : Tools / Macros / Visual Basic Editor...
Then you insert a Module : Insert / Module
....in which you past the following VBA code:

Sub QualityDuration()
ActiveCell.Task.Duration = ActiveCell.Task.PredecessorTasks(1).Duration /
(ActiveProject.HoursPerDay * 60) * 1.5 & "d"
End Sub

- The HoursPerDay property read the number of hours you have set in Tools /
Options / Calendar...

Tell me if it works for you,

Gérard Ducouret


"Bapu" <[email protected]> a écrit dans le message de [email protected]...
Gerard,

I've not used VBA before. I am a "programmer" but lack any
VBA exeperince. Can you provide a simple VBA example (of
any type) so I can undertsnad the paradigm?

TIA,
 
B

Bapu

Hello Gerard,

Thank you so much for the example code. I have yet to try
it but I will update you after I do.

TIA,
Bapu
-----Original Message-----
Hello Bapu,
You go to the VisualBasic Editor : Tools / Macros / Visual Basic Editor...
Then you insert a Module : Insert / Module
....in which you past the following VBA code:

Sub QualityDuration()
ActiveCell.Task.Duration =
ActiveCell.Task.PredecessorTasks(1).Duration /
 
B

Bapu

Gerard,

I created a new "empty" project. I inserted your code
below into a new module of the project.

I created task 1 for a 10 day duration. I then created
task 2 and declared it predecessor as task 1.

The duration of task 2 is initialized and stays at "1
day ?". How is it supposed to change based upon the module
I created? What fires that module?

TIA,
Bapu

-----Original Message-----
Hello Bapu,
You go to the VisualBasic Editor : Tools / Macros / Visual Basic Editor...
Then you insert a Module : Insert / Module
....in which you past the following VBA code:

Sub QualityDuration()
ActiveCell.Task.Duration =
ActiveCell.Task.PredecessorTasks(1).Duration /
 
G

Gérard Ducouret

Hello Bapu,

If Task2 is the successor, you select this Task2 and run the macro :
Tools / Macro / Macros... / Select the QualityDuration macro / click the
"Run" button.

Later, you could set a button in a tool bar to run this macro with only one
click of mouse.

Gérard Ducouret

"Bapu" <[email protected]> a écrit dans le message de [email protected]...
Gerard,

I created a new "empty" project. I inserted your code
below into a new module of the project.

I created task 1 for a 10 day duration. I then created
task 2 and declared it predecessor as task 1.

The duration of task 2 is initialized and stays at "1
day ?". How is it supposed to change based upon the module
I created? What fires that module?

TIA,
Bapu

-----Original Message-----
Hello Bapu,
You go to the VisualBasic Editor : Tools / Macros / Visual Basic Editor...
Then you insert a Module : Insert / Module
....in which you past the following VBA code:

Sub QualityDuration()
ActiveCell.Task.Duration =
ActiveCell.Task.PredecessorTasks(1).Duration /
 

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