3 Replies Latest reply: Nov 30, 2012 10:34 AM by Christopher Murrell RSS

    Macro to change Button ID

    Christopher Murrell



      I am trying to dynamically add a button to my Qlikview page using


      set newbutton = ActiveDocument.ActiveSheet.CreateButton

      set prop = newbutton.GetProperties

      prop.Text.v = "Remove"

      newbutton.SetProperties prop


      The button gets added correctly but the trouble I am having is trying to set the ID of this new object.


      I am also create a new text object and using the API I found that it is very easy to set the ID of this type of object using


      set mytext = ActiveDocument.ActiveSheet.CreateTextObject

      prop = mytext.GetProperties

      prop.Layout.Frame.ObjectId = "Document\NewID"

      prop.Layout.Text.v = Tot

      mytext.SetProperties prop


      Is there a similar way of doing the above for a button?


      Many thanks for your help!