2 Replies Latest reply on Sep 21, 2018 7:19 AM by Asle Frantzen

    Assign multistate to a Commandbutton in VBA

    Fiannax

      Hi,

      I have a server with different Processbook displays on it, every user in the company have access to these displays. Every display has different Commandbuttons that change colour\"shape" when pressed, but only the user who makes the change (user1) can see the actual state of the button because it doesn't apply till user1 saves the display, user2 can't see the button updating in real time so I'd like to know if is possible to assign a multistate to a commandbutton with VBA or if you have any suggestion. I tried with a simple rectangle but it loses the Caption property that I use to store the tagname.

       

      Regards

        • Re: Assign multistate to a Commandbutton in VBA
          Eugene Lee

          As the CommandButton doesn't derive from the Symbol class, it doesn't have multistate support. You can use the Text Symbol instead.

           

          It has the support that you need such as the Click event, the Contents property for storing your tag name, it has multistate support. You can also overlay a Rectangle on it to make it look more like a 'button'.

          1 of 1 people found this helpful
            • Re: Assign multistate to a Commandbutton in VBA
              Asle Frantzen

              Through different projects I've experienced that using the Text symbol as button isn't a perfect solution, as users would have to "aim" for the actual text lines. Especially when using larger fonts it's annoying that if you press in the middle of the letter U or O nothing happens. The solution we've used is to create a rectangle with No Fill and place that above the text, and use the button_click event for that instead. You can add a gray border so it resembles a button, that makes it much more intuitive for the end user.

              1 of 1 people found this helpful