9 Replies Latest reply: Dec 14, 2011 10:09 AM by Anil Chakelam RSS

    Button colour should change after selecting the button

      Hi Guys,,

       

       

                     In my report i have 3 buttons and some objects are linked to these buttons.My requirement is if i click on one button that button clour should change ,,, if i click on second button that colour should change...... i.e we can easily idetify that the button is active, for this i have written a below macro but its not working so please give me ypour suggestions what is wrong here........

       

       

      sub activate3

      set ITMHierarchy=activedocument.getsheetobject("BU07")

      set prop= ITMHierarchy.getproperties

      prop.bkgcolor.primarycol.col=rgb(0,255,0)

      ITMHierarchy.setproperties prop

       

      set ITMHierarchy=activedocument.getsheetobject("BU08")

      set prop= ITMHierarchy.getproperties

      prop.bkgcolor.primarycol.col=rgb(128,128,128)

      ITMHierarchy.setproperties prop

       

      set ITMHierarchy=activedocument.getsheetobject("BU09")

      set prop= ITMHierarchy.getproperties

      prop.bkgcolor.primarycol.col=rgb(128,128,128)

      ITMHierarchy.setproperties prop

       

      end sub

       

       

      sub activate4

      set ContractualPortfolio=activedocument.getsheetobject("BU08")

      set prop= ContractualPortfolio.getproperties

      prop.bkgcolor.primarycol.col=rgb(0,255,0)

      ContractualPortfolio.setproperties prop

       

      set ContractualPortfolio=activedocument.getsheetobject("BU07")

      set prop= ContractualPortfolio.getproperties

      prop.bkgcolor.primarycol.col=rgb(128,128,128)

      ContractualPortfolio.setproperties prop

       

      set ContractualPortfolio=activedocument.getsheetobject("BU09")

      set prop= ContractualPortfolio.getproperties

      prop.bkgcolor.primarycol.col=rgb(128,128,128)

      ContractualPortfolio.setproperties prop

       

      end sub

       

       

      sub activate5

      set OperationalPortfolio=activedocument.getsheetobject("BU09")

      set prop= OperationalPortfolio.getproperties

      prop.bkgcolor.primarycol.col=rgb(0,255,0)

      OperationalPortfolio.setproperties prop

       

      set OperationalPortfolio=activedocument.getsheetobject("BU08")

      set prop= OperationalPortfolio.getproperties

      prop.bkgcolor.primarycol.col=rgb(128,128,128)

      OperationalPortfolio.setproperties prop

       

      set OperationalPortfolio=activedocument.getsheetobject("BU07")

      set prop= OperationalPortfolio.getproperties

      prop.bkgcolor.primarycol.col=rgb(128,128,128)

      OperationalPortfolio.setproperties prop

       

      end sub