What reference should be add to use "Controls" object in VBA programming ?
"Control" is a general description of an item that provides certain functionality such as displaying data or allowing user interactions. You can place controls on a display using this ProcessBook button
Clicking this button will change the mouse cursor and you can draw a rectangle on the display to place the control. Common controls are e.g. Microsoft Forms 2.0 Command Button, Image, Label, Listbox but you can enhance the list of available controls by installing additional packages from 3rd party providers. Please note that these controls must be installed on every ProcessBook client supposed to use your customized displays.
This button is used to launch the VBA Editor that allows you to enter custom VBA code to define what you want the placed controls to do. Within the VBA Editor there's the ability to create custom Forms that you can use to allow user interaction or display additional information.
All this usually does not require adding a project reference to your VBA project.
I hope this answer is sufficient. If not, please describe a bit more detailed what you are trying to do.
Thanks for your reply. The controls I want to use as below, but it pop-up "Complie error : Sub or Function not defined" and highlighted [Controls]. It is I used wrong method?
Would you provide other method to use dynamic control the items in the form.
Below is the code that I want to use :
Dim i As Integer
For i = 1 To 8
Controls("GoodGraphic" & i).Visible = False
For each control on the display, there is a default variable name. For instance, if you add a "Microsoft Forms 2.0 Label", the variable name by default would be "Label1".
But you can change the name of the variable of the related control. Just right-click on the object on PI ProcessBook and choose Properties. You can choose the name of the variable on the field (Name).
Then, on VBA, you can set up the Visible property as:
Labe1.Visible = True
Let me know if you still have any questions,
I believe what you are trying to do will work if you would be using "Symbols" instead of "Controls".
I have created a little example display (see attached) that shows how to dynamically access ProcessBook symbols.
Many thanks! That's the coding I want.
Retrieving data ...