Exporting Timephased data to Excel

M

MarkP

First, THANK YOU Jack Dahlgren

He wrote an amazing article and form to export Timephased data to Excel
(see here for details:
http://zo-d.com/blog/archives/progr...oft-project-resource-usage-data-in-excel.html)

My problem is that after following the instructions, I get the this error
message when running the macro "showExportForm"

The error is:
Run-time error '424';

Object required


Did anyone run into this with his code ?

I'm sure I'm missing something...

Thanks!
-MarkP
 
M

MichaelA

Hello Mark,

While I didn't use Jack's macro word for word, line for line, I did
use it as a reference for exporting data into Excel from Project. It
worked fine without any major errors. I would check to make sure you
have the Office Library checked under References.


Regards
Michael A.
 
J

Jan De Messemaeker

Hi,

When you ask for help on such a problem, it is always better (if not
absolutely necessary) to tell which line of code causes the error.
When you get the runtime error window, click debug and note hoich line of
code is overlined in yellow.
That may help find the culprit!

Greetings

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

MarkP

Jan & Michael A

1) I did check the Office Library (I'm using Excel 2003)
2) The code stops here: exportResourceTimescaledData.Show
3) I'm using Project 2007

Thanks for the help.

- MarkP
 
J

Jan De Messemaeker

Hi,

I don't have Jack's code at hand but this statement means he wants to show a
form - which probably is not joint to his code.
I hope you can figure out which form is needed and you can make it, or ...
myabe Jack will come along in this newsgroup?

Greetings,

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

MarkP

Jan,

Thanks for the suggestion.

My problem was the .zip file unpacked the form as
"exportResourceTimescaledData0" and the call was to
"exportResourceTimescaledData"

(Note the zero at the end)

HUGE THANKS ! one and all.

-MarkP
 
M

MarkP

Jan,

Thanks for the tip.

I copied the example from Rod Gills book. (Sent him an email separately)

I tried 2 other variables and still got the same error.

Set TSV = r.TimeScaleData(StartDate:= _
ActiveProject.ProjectSummaryTask.Start, _
EndDate:=ActiveProject.ProjectSummaryTask.Finish, _
Type:=pjAssignmentTimescaledWork, _
TimeScaleUnit:=pjTimescaleMonths, Count:=1)

Set TSV = r.TimeScaleData(StartDate:= _
ActiveProject.ProjectSummaryTask.Start, _
EndDate:=ActiveProject.ProjectSummaryTask.Finish, _
Type:=pjAssignmentTimescaledPercentAllocation, _
TimeScaleUnit:=pjTimescaleMonths, Count:=1)

Both of the above fail.


- Mark
 
R

Rod Gill

Assuming r is a Resource, then your type is the problem:
Type:=pjAssignmentTimescaledWork

Use Type:=pjResourceTimescaledWork instead

--

Rod Gill
Microsoft MVP for Project

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

MarkP

Rod,

YOU ARE THE MAN !

Can't wait to read your book (I just ordered).

Does your book answer these 2 questions;
1) How to export resource custom fields
2) Why the export does not seem to work if using Resource Pool
--- ie, the project must be standalone

HUGE THANKS !

- MarkP
 
R

Rod Gill

Hi,

Great choice of book!!

Local custom fields are just normal properties of any Resource. Enterprise
Custom fields are different, but yes the book does explain!

With a Resource pool, data can be exported from any project, but you will
only see assignments local to that project. The pool has to be open to see
all assignments across all projects attached to that pool.

--

Rod Gill
Microsoft MVP for Project

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

MarkP

- All

Thanks for all the tips.

I have solved all my open issues.

I am near the point where I will have a form that allows you to export the
info from Usage View. WAHOO !

My next step will be to create a way to select the columns to export.

Once completed, I'd like to send it to someone who could post it on their
site for general downloads by interested users.

Anyone care to volunteer and host the file?

regards,
MarkP
 

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