Excel Chart Macro Issue

Tech-Archive recommends: Fix windows errors by optimizing your registry



OK, I have an interesting issue. For the most part my macro seems to
work for creating and updating charts dynamically. But I am running
into an issue. If the chart data gets too large then it drops some of
the selections and errors out.

The following is a string in my macro for the series collection:

X = "=Employee_Hours!R652C1,Employee_Hours!R655C1,Employee_Hours!
R660C1,Employee_Hours!R667C1,Employee_Hours!R670C1,Employee_Hours!
R673C1,Employee_Hours!R676C1,Employee_Hours!R679C1,Employee_Hours!
R682C1,Employee_Hours!R685C1,Employee_Hours!R688C1"

Y = "=Employee_Hours!R653C4,Employee_Hours!R656C4,Employee_Hours!
R661C4,Employee_Hours!R668C4,Employee_Hours!R671C4,Employee_Hours!
R674C4,Employee_Hours!R677C4,Employee_Hours!R680C4,Employee_Hours!
R683C4,Employee_Hours!R686C4,Employee_Hours!R689C4"

This shows correctly when I debug it, but I get an error. If I resume
next and ignore the error and view the chart source I get the
following:

Y = =Employee_Hours!$D$653,Employee_Hours!$D$656,Employee_Hours!$D
$661,Employee_Hours!$D$668,Employee_Hours!$D$671,Employee_Hours!$D
$674,Employee_Hours!$D$677,Employee_Hours!$D$680,Employee_Hours!$D
$683,Employee_Hours!$D$686 Employee_Hours!

X = =Employee_Hours!$A$652,Employee_Hours!$A$655,Employee_Hours!$A
$660,Employee_Hours!$A$667,Employee_Hours!$A$670,Employee_Hours!$A
$673,Employee_Hours!$A$676,Employee_Hours!$A$679,Employee_Hours!$A
$682,Employee_Hours!$A$685 Employee_Hours!

The issue for some odd reason or another is the last part of these
entries. They are missing part of the string (It is missing the comma
and the last selection).

It does not happen on all of the employee data when I select them. I
am not sure what is happening being that if I modify the chart
selection and fix it manually it will display correctly

Can someone help me understand why this is happening
.



Relevant Pages

  • Re: Update "buildin" excel in a powerpoint with macro
    ... Problem #2 - How to get the macro to run more than a single time. ... make a simple chart in an Excel workbook ... Switch to a new empty PowerPoint presentation ... Switch back to Excel and quit Excel ...
    (microsoft.public.mac.office.powerpoint)
  • Re: Copying Charts While Changing Source Data
    ... The macro isn't on the web site (I may post it, though, because it's a good ... Const nRowsTall As Long = 12 ... ' chart layout ... Dim chtob As ChartObject ...
    (microsoft.public.excel.charting)
  • Re: Copying Charts While Changing Source Data
    ... Here's a macro that will create an array of charts, ... Const nRowsTall As Long = 12 ... Dim chtob As ChartObject ... I created a macro so that I could get to the code. ...
    (microsoft.public.excel.charting)
  • Re: Copying Charts While Changing Source Data
    ... The macro that you created will be ... The initial chart would pull data from ... Jon Peltier, Microsoft Excel MVP ... Dim chtob As ChartObject ...
    (microsoft.public.excel.charting)
  • RE: Very slow Visual Basic code execution in new Excel 2007
    ... It is caused by Chart. ... The only thing you can do is to re-write your macro based on recorded macro ... I purchased a new Toshiba laptop with 2 gig memory and an Intel ... I've found that Excel 2007 generally performs as fast as 2003 for most ...
    (microsoft.public.excel.programming)