用updown控件。
两行代码搞定。
Private Sub UpDown1_DownClick()
Text1 = Val(Text1) + 1
End Sub
Private Sub UpDown1_UpClick()
Text1 = Val(Text1) - 1
End Sub
Text1的文本框初始值设置为54.
Private Sub Form_Load() Dim i As Integer Text1 = "" For i = 1 To 99 Text1 = Text1 & i & vbCrLf Next Me.Show Text1 = Text1 & i DoEvents Text1.SelStart = 51 * 4 - 1'设置默认值为54
End Sub