+ Reply to Thread
Results 1 to 4 of 4

Help with spin button

Hybrid View

  1. #1
    Registered User
    Join Date
    09-25-2013
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    10

    Help with spin button

    Hey again, I was wondering if anyone could help with a spin button programming.
    I am looking to change 2 fields on an excel sheet - C21 and C22- with a spiin button(up and down)
    I did some research and found the code below which works but when i click anywhere on the screen i can change the value, i am looking to have 1 spin button change C21 when i am clicked on it and when I click on C22 i can change the number of it(up or down)
    the code below works, but i can click anybox on the excel sheet and change the number which is not acceptable. Does anyone know how to do this.

    any help is appreciated.

    -------------------------------------
    Private Sub SpinButton1_SpinUp()
        With Selection(1)
            If VarType(.Value) = vbDouble Or _
               VarType(.Value) = vbEmpty Then
                .Value = .Value + 1
                AppActivate "Microsoft Excel"
            End If
        End With
    End Sub
    
    Private Sub SpinButton1_SpinDown()
        With Selection(1)
            If VarType(.Value) = vbDouble Or _
               VarType(.Value) = vbEmpty Then
                .Value = .Value - 1
                AppActivate "Microsoft Excel"
            End If
        End With
    End Sub
    --------------------------------------------------------------
    Last edited by miko.sims; 10-08-2013 at 08:42 PM. Reason: needed #

  2. #2
    Registered User
    Join Date
    09-25-2013
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Help with spin button

    no one? anyone?

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help with spin button

    I don't really understand the question, sorry.
    The default Spinner buttons that come with Excel don't satisfy your needs somehow?
    What you seem to be wanting is exactly what they do, surely?
    GG

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,937

    Re: Help with spin button

    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Spin Button
    By wetfish in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2013, 01:27 PM
  2. Replies: 2
    Last Post: 03-12-2008, 06:52 PM
  3. Spin Button:spin cells A7
    By ice in forum Excel General
    Replies: 1
    Last Post: 03-16-2007, 02:23 PM
  4. [SOLVED] Spin Button
    By koenigma@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-12-2005, 03:05 PM
  5. spin button value
    By tina in forum Excel General
    Replies: 2
    Last Post: 03-17-2005, 11:06 AM

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