Calling a control from another

  • I have two DigitalPanelMeters and one BasicLabel1.  When I click on one of the DigitalPanelMeters I am changing the BasicLabel1.PLCaddressEntry.  This works fine, When I click on the DigitalPanelMeter and then on BasicLabel1 it opens up and I am able to enter the data.
    The problem is, that can't open the BasicLabel1 automatically when I click on one of the DigitalPanelMeters.

     Private Sub DigitalPanelMeterBlue1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DigitalPanelMeterBlue1.Click
            BasicLabel1.PLCaddressEntry = "N7:1"
            BasicLabel1_Click() '             This will not compile  (missing the "e" and and "sender" values)
        End Sub
        Private Sub DigitalPanelMeterBlue4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DigitalPanelMeterBlue4.Click
            BasicLabel1.PLCaddressEntry = "N7:3"
            CALL BasicLabel1_Click()  '                  This will not compile either
     End Sub

    In VB6 I would use the "Call" function, but I am new to 2010 Express, so I am stuck.  Any suggastions?


  • I forgot to show the BasicLabel1 code

    Private Sub BasicLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    End Sub
  • Archie

    Try passing your same sender and e objects to the button click event:


  • Thanks for the reply.  However,  it still does't open. 
    Right now I am changing the color on the BasicLabel1 to green,  when pressing the PanelMeter with the followin text: "Press to change value".  That is just to get going.  It would be nice if it opens by itself.
    Thanks, again

  • Archie

    I may not be understanding exactly what you are trying to do, but wouldn't it be easier to use the PLCAddressEntry in the DigitalPanelMeter to get a pop up keypad directly?