Hopw to copy hours from Excel cells, paste into Task Usage screen cells?

G

G Lykos

Greetings! Have resource assigned task hours by week in Excel, would like
to set up Task Usage in same time units, select a task, assigned resource,
point at a starting cell in Task Usage - Details and copy values from some
number of horizontal cells in Excel into that row in Project.

Recorded a macro for an idea of what hooks might be available, saw that
getting into it at the task, assignment, timeframe, etc. level looks messy.
Would like to deal at the application level - copy an array of values from
one screen (Excel), paste it into another in Project (just like I was
punching in the values one after another, like macros in the old days), and
let the Project form sort out distributing the data into the right places
inside.

Looking for a VBA solution: ideas on how to interact with Project at the
form level, I expect (such as Task Usage, selecting a particular cell in
Details to anchor an array paste).

Thanks,
George
 
R

Rod Gill

Hi,

You can't copy/paste into the usage view, but you can access and update all
data using VBA. It isn't simple, but reliable and straightforward. As a
starting tip, look for the timescaledata methods. Post problems as you go,
otherwise my book has several working examples of doing what you want.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
G

G Lykos

Rod, thanks for your guidance and offer.

In a resource view, with an assignment selected, I can step into this
snippet and see Work values TSV(1-7).

Dim TSV As TimeScaleValues
Set TSV = ActiveCell.Resource.TimeScaleData("3/23/09", "3/29/09",
TimescaleUnit:=pjTimescaleDays)

How do I turn around and write values back to the same place?

Thanks,
George
 
G

G Lykos

In poking around a little bit in this forum, discovered that the syntax
appears to be TSV.Item(x).Value = y.

Regards.
 
G

G Lykos

However, .Value in the code immediately collapses to .value, and upon
stepping into it, 'the argument value is not valid'. Back to you...
 

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