Page 1 of 1

Issue with using the OnGetSeriesMark event in VBScript

Posted: Tue Dec 07, 2004 12:43 am
by 9080335
I am attempting to use the OnGetSeriesMark event to update the marktext, but am having difficulty being able to modify the value. I am using the following code:

Code: Select all

Sub TChart1_OnGetSeriesMark(SeriesIndex , ValueIndex ,ByRef MarkText )
'msgbox "OnGEtSeriesMark"
	If ValueIndex > 0 Then
		If TChart1.Series(SeriesIndex).YValues.Value(ValueIndex) > TChart1.Series(SeriesIndex).YValues.Value(ValueIndex - 1) Then
			MarkText = MarkText & " (Up)"
		ElseIf TChart1.Series(SeriesIndex).YValues.Value(ValueIndex) < TChart1.Series(SeriesIndex).YValues.Value(ValueIndex - 1) Then
			TChart1.Series(SeriesIndex).Marks.ArrowLength = 5
			MarkText = MarkText  & "(Down)"
		Else
			TChart1.Series(SeriesIndex).Marks.ArrowLength = 25
			MarkText = MarkText  & "(No change)"
		End If
		TChart1.Series(SeriesIndex).Marks.BackColor = TChart1.Series(SeriesIndex).Color
	End If
End Sub
The setting of the ArrowLength works great, but since marktext is setup as a ByRef calling parameter, it appears that in VBScript, I am unable to actually change the contents of MarkText. Is there something else that I have to do to get this to work in IE and VBScript?

Thanks,
Scott Small

Posted: Tue Dec 07, 2004 10:52 am
by Chris
Hi,
The setting of the ArrowLength works great, but since marktext is setup as a ByRef calling parameter, it appears that in VBScript, I am unable to actually change the contents of MarkText. Is there something else that I have to do to get this to work in IE and VBScript?
This problem also seems to be reproducible in Internet Explorer, where there seems to be an incompatibility in the passing of text from an ActiveX Control back to this environment. A solution would be to use Annotation Tools instead of ISeries Marks and change the text that way.