Is there a way to automatically have code inserted when an object is created and code exists?
In other words, if you create a Button and within the Click Event have the following:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Text = "Hello"
End Sub
Then you delete the Button. When you create the next Button although it is called Button1, the code doesn't appear within the Click Event.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Button1.Text = "Hello"
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
I can either cut and paste the code or cut and paste the handle info ie: "Handles Button1.Click" and delete the other. Is there a way for the code to automatically be inserted?
TIA
gmacpro
In other words, if you create a Button and within the Click Event have the following:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Text = "Hello"
End Sub
Then you delete the Button. When you create the next Button although it is called Button1, the code doesn't appear within the Click Event.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Button1.Text = "Hello"
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
I can either cut and paste the code or cut and paste the handle info ie: "Handles Button1.Click" and delete the other. Is there a way for the code to automatically be inserted?
TIA
gmacpro