codice:
Private Sub Text1_KeyPress(KeyAscii As Integer)
Static intNum As Integer
    If KeyAscii = 13 Then
        intNum = intNum + 1
        Text1.Text = Text1.Text & intNum & vbCrLf
    End If
End Sub