Implementing VBA-Compatible Multistate Button Functions in FTV 12 SE

Question:

I am facing a unique challenge and in need of assistance. I have a multistate button with 5 different states, and I need to implement a function where clicking on it will activate a proprietary activex control to log user actions. The usual VBA code for a standard button is as follows: Private Sub ExampleButton_Click( ) ExampleActiveXControl.SignEnd Sub However, the FTV multistate buttons do not support VBA, only "Type Info Extension". I am looking for solutions to either simulate a multistate button using VBA-compatible buttons or find a workaround for this issue. Any help or suggestions would be greatly appreciated.

Top Replies

One can utilize VBA functions on text fields to trigger actions when data is modified. For example, I used this technique on the "minute" field within a time display in a graphic header to implement an automatic logout script for privileged users after 15 minutes. Another method is to create a concealed field, perhaps hidden behind an element or colored to blend with the background, which updates based on user interaction such as a button press (e.g. PLC tag, HMI tag, etc). By applying VBA to this hidden field, you can execute desired actions.

Understood, your problem indeed sounds intriguing and somewhat complex. Have you already considered integrating a set of standard VBA-compatible buttons to simulate your multistate button? Each one could represent a particular state and you could hide or show them based on the state you want to be active. For logging in user activities, you might look towards a shared global scope function that will log these actions irrespective of what state the button is in. Have a look around, combining different components creatively might work wonders here. Hope this helps, and do let us know how you progress in your project.

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: FAQs:

Answer: 1. Can FTV 12 SE multistate buttons support VBA code directly? - No, FTV multistate buttons do not support VBA code directly. They only support "Type Info Extension".

FAQ: 2. How can I implement VBA-compatible functions with FTV multistate buttons?

Answer: - One possible solution is to simulate a multistate button using VBA-compatible buttons. This can help achieve the desired functionality.

FAQ: 3. Is there a workaround to enable VBA functionality for multistate buttons in FTV 12 SE?

Answer: - While FTV multistate buttons do not support VBA, exploring alternative methods like simulating multistate buttons with VBA-compatible buttons may provide a workaround for implementing desired functions.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’