2 Replies Latest reply on Jun 15, 2015 3:12 PM by Karl-Eric

    Hide traces name and description via vba ?


      Hello everybody and thanks for reading !


      I hope i'm posting this in the right section, sorry if not.

      I have a processbook which  contains around 250 trends with multiple traces in each trend.
      I'm looking to create a loop that will hide the names and descriptions of each traces.
      I've searched a lot but can't seem to find my answer. I'm looking for something like this
      Thistrend.currenttrace.name.visible = false


      Thanks for you answers and sorry if I made english mistakes, I'm from Qc

        • Re: Hide traces name and description via vba ?
          Rhys Kirk

          Explore the TrendFormat object for the Properties you want to toggle on or off. Your code can be as simple as:


          Sub ChangeTrends()
          Dim s As Symbol
          For Each s In Symbols
              If s.Type = pbSYMBOLTYPE.pbSymbolTrend Then
                  Dim t As Trend
                  Set t = s
                      Dim tf As TrendFormat
                      Set tf = t.GetFormat
                          tf.ShowDescription = False
                          tf.ShowTagName = False
                      Call t.SetFormat(tf)
                  Set t = Nothing
              End If
          Next s
          End Sub
          1 of 1 people found this helpful