-
UpDown control
I´m having a trouble using UpDown control (Active X).
I have a textbox as a buddy to my control and set the increment to 1000.
Problem is that, if the user enters a number in my textbox ex. 1 and I
click my control to increment the number with 1000. The result isn´t 1000
which I want it to be, the result in my textbox is 2000.
Understand my problem ???
My code is very easy:
txtPoUt.Text = scrPoUt.Value
/ Fredrik
-
Hi Fredrik.
Try setting the syncbuddy property to false, then writing your own event code for when the user clicks up or down:
Private Sub scrPoUt_DownClick()
txtPoUt.Text = CStr(Val(txtPoUt.Text) - scrPoUt.Increment)
End Sub
Private Sub scrPoUt_UpClick()
txtPoUt.Text = CStr(Val(txtPoUt.Text) + scrPoUt.Increment)
End Sub
Kevin