3 Replies Latest reply: Jun 4, 2010 3:50 PM by Enthusiast RSS

    open chart when certain field is selected

      Hi!

      I have a list box with a few indexes and a few chart which have sence only with selected index

      Does anyone know how to realize macros wich will restore certain chart if certain field in list box is selected?

       

      I've tried to make my own macro,but it didn't work. I know that a have a mistake here,but I can't understand where and why..((

       

      Sub Test

      Set obj = ActiveDocument.GetSheetObject("LB02")

      Set fld = ActiveDocument.Fields("indexes")'

      CurrVal = ActiveDocument.Fields("indexes").GetContent.String

      if CurrVal = ActiveDocument.Fields("first_index") then


      ActiveDocument.GetSheetObject("CH03").Restore

      end if

      End sub

       

      Regards,Anton.