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.

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.