Public Class Form1
Function Do_Following() 'This is the function we are calling
item1.Enabled = False
item2.Enabled = False
Return Nothing
End Function
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Do_Following() 'call the function which we created earlier
End Sub
End Class
Public Class Form1
Function Do_Following() 'This is the function we are calling
item1.Enabled = False
item2.Enabled = False
Return Nothing
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Do_Following() 'call function
End Sub
End Class