Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use the following code in a SpinButton. If I manually edit the TextBox1
to 150.25 it is fine but when I use150.6, it rounds the result up and does not allow the two decial point entry in fact any number over 150.5 turns to 151. How can I keep the number entered as is without rounding it up? Not sure which property needs adjusting, Private Sub SpinButton1_Change() TextBox1.Text = SpinButton1.Value End Sub Private Sub TextBox1_Change() Dim NewVal As Integer NewVal = Val(TextBox1.Text) If NewVal = SpinButton1.Min And _ NewVal <= SpinButton1.Max Then _ SpinButton1.Value = NewVal End Sub -Randy- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Substitute for OLE SpinButton? | Excel Discussion (Misc queries) | |||
Spinbutton | New Users to Excel | |||
Spinbutton | Excel Discussion (Misc queries) | |||
Spinbutton grays out toolbars | Excel Programming | |||
Spinbutton Linked to Textbox | Excel Programming |