Sería mas o menos así:
Cita: Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim KeyAscii As Integer
KeyAscii = filtroEntero(Asc(e.KeyChar))
End Sub
Public Function filtroEntero(ByVal KeyAscii As Integer)
If KeyAscii <> 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
Return 0
Else
Return KeyAscii
End If
Else
Return 8
End If
End Function
Ya sería cosa de adaptarlo a lo que necesitas pero esa es la idea general.
Espero que te sirva.
Salu2