Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

UpdateChartData Method for

$
0
0

I am using MS Project 2013 Pro (desktop client) and trying to set up the dashboards for my users to see our utilization rates.  Part of this is a chart with rolling dates.  I was trying to use the Update Chart Method but keep getting a run time error '5' - Invalid procedure call or argument.  How do I correctly call or define the arguments for this method?  I used similar code for other chart object functions but it doesn't seem to work for UpdateChartData. 

The code I attempted to use is:

Option Explicit
Sub draft_RPT_update_rolling4month()
On Error Resume Next
Dim chartshape As Shape
Dim reportName As String
reportName = "FlexSteel Technician Overview"
ActiveProject.Reports(reportName).Apply
Set chartshape = ActiveProject.Reports(reportName).Shapes("Chart 11")
chartshape.Chart.UpdateChartData Task:=True, Timephased:=True, StartDate:=CDate(DateAdd("d", -60, Date)), finishdate:=CDate(DateAdd("d", 60, Date))

End Sub

I am barely a novice at VBA and am sure that I am making a very simple mistake. Please help!

Regards

DChoate


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>