Your button click handlers seem to have lost their association with the buttons. Either you copy-pasted the code in without hooking up the handlers or de-selected the handlers in the object's Events pane. Just add the Handles
clause back in like :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For s = 1 To 100
RichTextBox1.AppendText(" Button1 - " & s & vbCrLf)
Next
End Sub
See : Handles Clause (MSDN)
As an aside, you should also seriously consider turning ON Option Explicit
and Option Strict
in your project options. These can be turned off for compatibility with legacy VB code but they encourage sloppy code that can lead to headaches and trouble. Your handler would look like this with those options :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim s As Integer ' Option explicit - must declare all variables!
For s = 1 To 100
RichTextBox1.AppendText(" Button1 - " & s.ToString() & vbCrLf)
' Option strict -> no implicit casting of types (ie : int to string ^^)
Next
End Sub