1) Time est une fonction du langage, qui renvoie l'heure. Nomme donc ton objet tmr, par exemple.
2) Faudrait que tu comprennes ce que tu codes ! Ce que tu nous présentes n'a aucun sens.
3) T'a convention de nommage (et tes noms) n'a aucun sens : cmd c'est pour les boutons, txt pour les textbox, ...
'Dans un module mod_Textbox
Option Explicit
Private Const ES_NUMBER = &H2000&
Private Const GWL_STYLE As Long = -16
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Sub RestrictTextboxToNumbers(txt As TextBox)
SetWindowLong txt.hwnd, GWL_STYLE, GetWindowLong(txt.hwnd, GWL_STYLE) Or ES_NUMBER
End Sub
'Dans Form_Load
RestrictTextboxToNumbers txtInterval
'Bouton ou tout ce que tu veux
tmr.Enabled = True
If Me.txtInterval.Text = "" Then tmr.Interval = 100 Else tmr.Interval = CInt(Me.txtInterval.Text)
VB.NET is good ... VB6 is better !