Try it like this...
Code:
Private Sub Text1_Change()
Dim num As Integer
' Use Val() to get the value of the text,
' non-numeric entries will evaluate to zero.
num = Val(Text1.Text)
' Make sure you have a valid value before trying to set the scrollbar.
If (num >= HScroll1.Min) And (num <= HScroll1.Max) Then
HScroll1.Value = num
End If
End Sub
|
__________________
1011 0000 1011
|