Quello che hai usato è VB.NET ...
Certo ... usare un linguaggio di programmazione e non sapere neanche quale sia ...
Comunque, se ho capito e per non fare cose complicate
codice:txtCode1.Text = "Private Sub imgRe_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles imgRe.Click" + vbCrLf + _ "Timer.Enabled = True" + vbCrLf + _ "j = 1" + vbCrLf + _ "End Sub"