Good morning,

I know there are several threads I have seen on here for transferring values, but my problem is that the value gets to the correct form but it isnt "sticking" to the variable it is assigned to? If that makes sense.

I am using a Public property, the value is being returned correctly because I tested for it, but when it comes to the variable its supposed to be assigned to, it isnt changing.

This is the portion of the code in form 2 that "sends" the values from frmWire to frmComponentEditor.

Code:
Private Sub btnExit_Click_1(sender As Object, e As EventArgs) Handles btnExit.Click

        frmComponentEditor.descText = lblWireType.Text

        Me.Close()

    End Sub
This is the code I am using in ffrmComponentEditor to get the values from form2 to form1, I am using the Msgbox() to test if the values are actually being transferred and they are.

Code:
Public Property descText As String
        Get
            Return MyData
            MsgBox(MyData & "A")
        End Get
        Set(ByVal value As String)

            MsgBox("Set " & value)

            lblDesc_1.Text = value

            MsgBox(lblDesc_1.Text)
        End Set
    End Property
This is what I use to initiate frmWire.
Code:
Public Sub lblDesc_1_MouseHover(sender As Object, e As EventArgs) Handles lblDesc_1.MouseHover

        Dim X As frmWire = New frmWire

        X.ShowDialog()

        MsgBox(lblDesc_1.Text) <--- Tests value and is not updating.

    End Sub
The label1 under Wire: isn't being updated, nor is the value retaining its assignment to "Desc_1.text".

The assignment seems to work within the Public Property descText, but after that finalizes it's gone.

So, I know I am missing something really simple here, so if you could assist me in understanding what my mistake is and how to correct the error, I would be grateful.

Richard

Name:  2018-03-27_7-00-38.jpg
Views: 375
Size:  38.1 KB