0

I'm in desperate need of pointers :(

I have this problem.

private class frmMenu
private intX as integer
 Private Sub btnEstimate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEstimate.Click

 frmEstimateMenu.Show(intX)
end sub

end class

private class frmEstimate
private y as integer
Public Overloads Sub Show(ByRef x As integer)
y=x
end sub

Private Sub btnTransfer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTransfer.Click
y=5
end sub
end class

So when a user clicks the Transfer button on frmEstimate , it will change the value of intX on frmMenu.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by codeorder
0

Hi!

Your this line:

frmEstimateMenu.Show(intX)

should be:

frmEstimate.Show(intX)

I believe there is a typing mistake...

Also,

This should be amend as well:

Public Overloads Sub Show(ByRef x As integer)
y=x
MyBase.Show()  '' To leave the Show() feature of the form intact.
end sub
0

I believe that lines 1,2, and 10, should all start with Public, not Private.
Line17 should be: frmMenu.intX = 5 , if intX is a Public declaration.

Edited by codeorder: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.