Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2015, 07:06 PM
gmaxey gmaxey is offline How to increase Spin Button by .1 decimal Windows 7 32bit How to increase Spin Button by .1 decimal Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default


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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Tags
form field, spinbutton, vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to increase Spin Button by .1 decimal Help with Spin button and Do Loop combination Formd Word VBA 11 11-12-2015 02:33 PM
How to increase Spin Button by .1 decimal 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 increase Spin Button by .1 decimal How to remove Spin button hannu Excel 3 11-14-2013 01:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft