I have created a userform on a DeltaV Operate graphic. When the operator wants to start or stop a sequence, he clicks on a button on the graphic which opens the form. From the form, he selects various parameters which are sent to the sequence, which is located in a module within a DeltaV controller.
I would like to add a few links to 'live' data on this form, so that the data would update while the form is open, similar to a normal 'datalink' on a graphic. To do this I would typically use the VB 'timer' control. But I have learned that the timer control in not available in VBA. Several other options, such as using the Application.OnTime method, also do not seem to be supported within the DeltaV Operate VBA environment.
Does anyone have suggestions on how to provide a 'timer' like method that can be used within the DeltaV Operate VBA environment?
While I realize this isn't a direct answer to your question, is there any reason you couldn't use a DeltaV pop-up graphic for your operator form? Then you could use the standard DeltaV datalink functionality. In my mind, the closer you can stay to DeltaV functionality (and conversely the further from VBA and MS functions), the better you will be for future sustainability of the graphics.
Brian
In reply to Steve Elves:
Thank you all for the discussion.
In the past I have used VBA forms when I need to present choices and/or data to the operator, especially when the choices do not fit neatly into the standard YES/NO or other limited responses available using the 'Data Entry Expert', or when I need the operator to enter 2 or more pieces of data at the same time.
This time the complexity of what I was trying to accomplish has reached a tipping point. As several have suggested, a pop-up graphic or a custom faceplate seems to be a better chioce in this case. I will proceed down that path
Thanks again for the help
Alan
In reply to Alan K:
For future reference, you can create a timer in Operate VBA by invoking the Timer API.
support.microsoft.com/.../180736
(This example is for VB6, but I've used it in Operate VBA before).
This is fairly standard VB code. For the specific use case, I would agree that keeping as close to Operate standard functionality is a wise decision, but there's always some use case where standard won't cut it.