Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
Using VBA Code to Make a Spinner Display Noninteger Values
Article ID: 151498 - View products that this article applies to.
This article was previously published under Q151498
A spinner control only uses integer values. This article shows how to use Microsoft Visual Basic for Applications code to make a spinner control display noninteger values in an edit box.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. The following sample Visual Basic macro demonstrates how to use a spinner control to return the values 0-4 in .25 increments to an edit box. To create the sample dialog box and macro code, follow these steps:
To assign the SpinFraction macro to the spinner, follow these steps:
For more information about Spinners in Microsoft Excel 97, from the Visual Basic Editor, click the Office Assistant, type SpinButton, click Search, and then click to view "SpinButton Control."
NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If the Assistant is not able to answer your query, please see the following article in the Microsoft Knowledge Base:
176476For more information about spinners in Microsoft Excel 5.0, search on the word "Spinner" using Visual Basic Help.
(http://support.microsoft.com/kb/176476/EN-US/ )OFF: Office Assistant Not Answering Visual Basic Questions
Article ID: 151498 - Last Review: October 11, 2006 - Revision: 2.2