Page 1 of 1

Animation Failure

Posted: Sun Mar 07, 2004 8:00 am
by 9080337
Using VB6

With the following code, if the user closes down the program while the animation is running the program bombs with the following message: :(

Run-time Error '-2147418113 (8000ffff)
Method 'Execute' of object 'ISeriesAnimationTool' failed

Is there a way to abort out of the animation so that the program does not bomb?

Private Sub Command1_Click()

TChart1.Tools.Items(0).asSeriesAnimation.Execute

End Sub

Private Sub Form_Load()

'Set chart properties
With TChart1
.AddSeries scArea
.Tools.Add tcSeriesAnimation
.Series(0).FillSampleValues 50
.Legend.Visible = False
End With

'Set animation properties
With TChart1.Tools.Items(0).asSeriesAnimation
.Series = TChart1.Series(0)
.DrawEvery = 1
.StartAtMin = False
.StartValue = 0
.Steps = 10
End With

End Sub

Posted: Mon Mar 08, 2004 11:12 am
by Pep
Hi Lundy,

you can solve this adding a few lines to your code :

Code: Select all

Private Sub Command1_Click()
On Error GoTo procError
  TChart1.Tools.Items(0).asSeriesAnimation.Execute
  Exit Sub
procError:
  Exit Sub
End Sub