+ Reply to Thread
Results 1 to 3 of 3

numeric up down tool on userform

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-13-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    168

    numeric up down tool on userform

    Hi,

    Do we have NumericUpDown Tool Control in MS Excel 2003 that can be employed on a userform. The one similar to the numericupdown of VB.NET.

    I want to restrict user to input only numerals..

    Though I can use IsNumeric Validation in Textbox_Change event but still I was curious to know if there is any other in-built function in MS Excel..

    Regards,
    Vaibhav
    Last edited by c.vaibhav; 05-18-2009 at 08:00 AM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: numeric up down tool on userform

    Good morning c.vaibhav
    Quote Originally Posted by c.vaibhav View Post
    Do we have NumericUpDown Tool Control in MS Excel 2003 that can be employed on a userform. The one similar to the numericupdown of VB.NET.
    Yes, you can use a spinbutton. Set up a userform with a textbox (TextBox1) and a spinbutton (SpinButton1) and then use this code to see how the control affects the textbox :
    Private Sub UserForm_Initialize()
    TextBox1.Value = 1
    SpinButton1.Value = 1
    End Sub
    
    Private Sub SpinButton1_Change()
    TextBox1.Value = SpinButton1.Value
    End Sub
    There are other controls for a spinbox that can be set through the property window (Max / Min etc), or these can be set via code at run time.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Contributor
    Join Date
    01-13-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    168

    Re: numeric up down tool on userform

    That worked..

    thanks..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1