![]() |
|
#3
|
|||
|
|||
|
You will need to define the textbox value as a double:
Code:
Private Sub SpinButton1_SpinDown()
Dim dblRev As Double
dblRev = CDbl(TextBox1.Text) - 0.1
TextBox1.Text = Format(dblRev, "0.0")
End Sub
Private Sub SpinButton1_SpinUp()
Dim dblRev As Double
dblRev = CDbl(TextBox1.Text) + 0.1
TextBox1.Text = Format(dblRev, "0.0")
End Sub
Private Sub UserForm_Initialize()
TextBox1.Text = Format(CDbl("1.0"), "0.0")
End Sub
|
| Tags |
| form field, spinbutton, vba code |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Help with Spin button and Do Loop combination
|
Formd | Word VBA | 11 | 11-12-2015 02:33 PM |
Multiple spin animations one after the other
|
maximus123 | PowerPoint | 1 | 08-04-2015 05:33 AM |
| Pulling 2 digits before a decimal point from adjoining cell then zeros after decimal | jadess916 | Excel | 1 | 06-26-2014 03:48 AM |
| How to copy format of a column using spin button | Tyberian1988 | Excel Programming | 2 | 03-10-2014 10:09 PM |
How to remove Spin button
|
hannu | Excel | 3 | 11-14-2013 01:42 AM |