This content has been marked as final. Show 1 reply
the easiest way would be as simple as this:
Private Sub ShowTrace(attr As String) On Error Resume Next Trend3.AddTrace (attr) Trend3.ShowTrace = True End Sub
what concerns me more is you second sub - as I don't think you want to write 59 identical subs, how about this aproach:
- you act on the selection change event (because clicking on the value symbol changes the selection.
- you check that there is only one selected symbol
- you check that this selected symbol is a value
Private Sub Display_SelectionChange() If Me.SelectedSymbols.Count = 1 Then If Me.SelectedSymbols.Item(1).Type = pbSymbolValue Then Dim MySymbol As Value Set MySymbol = SelectedSymbols.Item(1) Dim attr As String attr = MySymbol.GetTagName(1) Call ShowTrace(attr) End If End If End Sub