I've created a button, but can't get it to run the msgbox("click") when I click.. What am I doing wrong? Thanks.
Private Sub main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
With mybut
mybut.AutoSize = True
mybut.Name = "delete-btn" & btn_number
mybut.Location = New System.Drawing.Point(500, 20)
mybut.Text = "Delete"
End With
End Sub
Private Sub mybut_Click(sender As Object, e As EventArgs)
MsgBox("Click")
End Sub