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
Animation Failure
Hi Lundy,
you can solve this adding a few lines to your code :
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
Pep Jorge
http://support.steema.com
http://support.steema.com