AnsweredAssumed Answered

Use variables in display macro from another display's macro

Question asked by Israa on Apr 17, 2019
Latest reply on Apr 17, 2019 by Carlos.Castro

Hello everyone,


I have created three variables in one display macro that serve as counters, now I need to store the three variables values in three textboxes in another display macro.

I already found similar question here and I tried the solution but it didn't work for me. Below are the lines I used, when I run the code it shows me "Run-time error '91' object variable or with block variable not set". Any suggestions or thoughts?!


   Private Sub Display_Open()

      Dim D As Display


       D = Application.Displays.Open("PDI LOCATION", True)


       A = D.Symbols("countDP1G").GetValue("*", Null)

       B = D.Symbols("countDP1L ").GetValue("*", Null)

       C = D.Symbols("countDP1B").GetValue("*", Null)


         TextBox1 = A

         TextBox2 = B

         TextBox3 = C


      End sub