5 Replies Latest reply on Dec 1, 2014 1:42 AM by thomas.clchan

    Controls Object problem

    thomas.clchan

       

       

      What reference should be add to use "Controls" object in VBA programming ?

        • Re: Controls Object problem

          Hello Thomas,

           

          "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 8203.InsertControl.jpg

           

          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 5808.VBAEditor.jpg 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.

            • Re: Controls Object problem
              thomas.clchan

              Hi Gregor,

               

              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

               

                 Next i

               

              Thomas