TimeScaleData => Run-time error '1101'

B

Bertrand

Hi !

I am trying to write a macro to export Resources data from MSP to
Excel using the TimeScaleData Method.

When a run the macro I have the "Run-time error '1101'' on the
following line:

Set pTSV =
ActiveProject.ProjectSummaryTask.TimeScaleData(tbStart.Value,
tbEnd.Value, TimescaleUnit:=cboxUnits.Value)

With:

tbStart = ActiveProject.ProjectStart
tbEnd = ActiveProject.ProjectFinish
Dim pTSV As TimeScaleValues
Form ComboBox :
cboxUnits.AddItem "Weeks"
cboxUnits.AddItem "Months"


I am using MSP2007 and I want to creat a macro to trace an S-curve in
Excel.
What can I do to correct the "Run-time error' ?

Regards
 
R

Rod Gill

Hi,

TimescaleUnit needs to be a constant value such as pjWeeks, click on the
word TimeScaleData and press F1 for help.

Incidentally I have created a free S-Curve macro you can download from
http://www.projectvbabook.com/ Click on the Free VBA Macros to download
link. The code there will obviously help a lot!!

--

Rod Gill
Microsoft MVP for Project

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

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