There seems to be something wrong, here you say
For GraphLoop = 1 To NumXValues
but a few lines later GraphLoop is used as an array:
...GraphLoop(GraphValues)...
(where you didn't say what GraphValues is). Not sure if this is the cause (I'm surprised this is running at all), but it surely complicates things in a confusing way.
For GraphLoop = 1 To NumXValues
but a few lines later GraphLoop is used as an array:
...GraphLoop(GraphValues)...
(where you didn't say what GraphValues is). Not sure if this is the cause (I'm surprised this is running at all), but it surely complicates things in a confusing way.