Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jul 2002
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    spin button (Word 2000)

    How do you get the spin button to move up or down one or more values with each click?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: spin button (Word 2000)

    The SpinButton control is part of the MS Forms controls. It is meant to be used together with other MS Forms controls on a UserForm, but it can be used in a document too.

    If you right click a spin button in design mode, you can select Properties. The following properties are relevant here:

    <table border=1><td valign=top>Name</td><td valign=top>Description</td><td valign=top>Max</td><td valign=top>Maximum value, e.g. 20</td><td valign=top>Min</td><td valign=top>Minimum value, e.g. 0</td><td valign=top>SmallChange</td><td valign=top>Amount by which the value changes with each click, e.g. 4</td><td valign=top>Value</td><td valign=top>In design mode: initial value; in run mode: current value</td></table>
    If you double click a spin button, the skeleton of the Change event procedure is created for you. You can write code here that takes the value of the spin button to do something.

    Trivial example: you have a spin button named SpinButton1 and a text box named TextBox1.

    You want the text box to reflect the value of the spin button:

    Private Sub SpinButton1_Change()
    TextBox1.Text = SpinButton1.Value
    End Sub

  3. #3
    Lounger
    Join Date
    Jul 2002
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: spin button (Word 2000)

    Thank you. This answers my question.

Posting Permissions

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