11 Replies Latest reply on Sep 26, 2013 1:40 PM by dhollebeek

    Passing Variables Between Displays in ActiveView

    rdube02

      We have a dashboard that we've developed in Processbook, and I'm trying to migrate it over to ActiveView.

       

      One of the solutions we came up with to have a dashboard with few displays to dynamically build themselves is to pass the display the machine number upon opening. I'm just not sure how to get this to work with ActiveView.

       

      We have three displays inside of a Workbook - MAIN, OEE, and CHARTS

       

      From MAIN, which displays all of the machines, we have a button that opens a new display to show all of the OEE values for that machine. Upon clicking to open the OEE display, we pass it the machine number with the following code:

       

       

       
      Private Sub btnOEE363_Click(ByVal lvarX As Long, ByVal lvarY As Long)
      Dim oBook As ProcBook
      Dim oEntry As Entry
      Dim strAction As String
      Dim d1 As Display
      
      Set oBook = Application.ProcBooks.Application.ActiveProcBook
      
      Application.ActiveProcBook.Title = "363"
      
      Set oEntry = oBook.Entries.Item(4)
      
      strAction = oEntry.Action
      oEntry.Execute (True)
      
      End Sub
      

       In the Display.Open event of the OEE screen we have the following code to pick up the data.

       
      ThisDisplay.lblMachine.Caption = Application.ActiveProcBook.Title
      strSelectedMachine = ThisDisplay.lblMachine.Caption
      

       Two problems I'm having right now - I can't seem to change displays via VBA in ActiveView using the above code, which works great in ProcessBook. But, if I create a non-VBA button in ProcessBook to navigate to <LOCAL>:OEE, that translates over to Activeview fine. The problem is that the variable isn't passed, so the opened display doesn't load right.

       

      My question is - how do people pass information between displays in Activeview, typically?