4 Replies Latest reply on Jul 11, 2016 11:00 PM by Gilson_Oliveira

    How to give information in an ProcessBook to another ProcessBook

    Brunoepc

      I'd like to give an information of a ProcessBook to another ProcessBook using VBA, thank you. (Eu gostaria de dar uma informação de um ProcessBook para outro ProcessBook usando VBA, obrigado.)

        • Re: How to give information in an ProcessBook to another ProcessBook
          John Messinger

          Bruno, what kind of specific information are you looking to pass between your two ProcessBooks? Are these two ProcessBook .PIW files, or two independent display .PDI files?

          • Re: How to give information in an ProcessBook to another ProcessBook
            Gilson_Oliveira

            Bruno,

             

            Considering that the display source is already open.

             

            Private Sub Display_DataUpdate()

             

                 Dim D As Display

                 On Error GoTo Msg1

                 Set D = Application.Displays("SOURCE")                ‘Display where the value to be copied

             

                 A = D.Symbols("VALUE_1").GetValue("*",Null)       ‘Dataset 1

                 B = D.Symbols("VALOR_2").GetValue("*", Null)      ‘Dataset 2

                 C = A + B

                            ThisDisplay.TEXT1.Contents = C

             

                 E = D.Symbols("VALOR_3").Contents                    'Textbox

                            ThisDisplay.TEXT2.Contents = E

             

            Exit Sub

             

            Msg1:

            MsgBox ("Open the display SOURCE")                         'If display SOURCE isn't open

             

            End Sub

             

            1 of 1 people found this helpful