R
Ron Dahl
I have created a project with a form called form1 and a module called
module1.
Form1 contains two buttons, button1 and button1.
The event code for button1 is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
DisableButton2()
End Sub
The procedure code in module1 is:
Public Sub DisableButton2()
Dim MyForm As Form1 = New Form1
MyForm.Button2.Enabled = False
End Sub
This code does not disable button1 and there is no error message.
What am I doing wrong?
Thanks in advance for any help.
Ron Dahl
module1.
Form1 contains two buttons, button1 and button1.
The event code for button1 is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
DisableButton2()
End Sub
The procedure code in module1 is:
Public Sub DisableButton2()
Dim MyForm As Form1 = New Form1
MyForm.Button2.Enabled = False
End Sub
This code does not disable button1 and there is no error message.
What am I doing wrong?
Thanks in advance for any help.
Ron Dahl