Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

Question regarding data transfer between multiple forms

$
0
0
This is on the first form of my program:

Code:

    Public Class Decks

    Public MasterPrice as Double

    Public Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged

        If RadioButton1.Checked = True Then
            MasterPrice = 60.0
        Else
            MasterPrice = 0

        End If
    End Sub

And then when I try to pull that variable back on the next form to show the price, I always get a return of 0.

Code:

Public Class Misc

    Public Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim deckform As New Decks
        MessageBox.Show(deckform.MasterPrice)

    End Sub

Any help would be greatly appreciated!

Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>