Results 1 to 5 of 5

Mouse fires SpinButton once, keyboard fires SpinButton twice

Threaded View

79590 Mouse fires SpinButton once,... 12-09-2015, 05:21 PM
JosephP Re: Problems with SpinButton... 12-09-2015, 06:15 PM
79590 Re: Problems with SpinButton... 12-10-2015, 10:12 AM
Leith Ross Re: Mouse fires SpinButton... 12-10-2015, 04:14 PM
79590 Re: Mouse fires SpinButton... 12-10-2015, 04:33 PM
  1. #1
    Registered User
    Join Date
    12-09-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Mouse fires SpinButton once, keyboard fires SpinButton twice

    Greetings. I'm fairly new to coding in VBA, and I've done my best to learn as I go, piece together code snippets, and look up answers to my problem. That said, I'm stuck and I can't figure out these two issues with SpinButtons.

    1. I've created a UserForm with five SpinButtons. Their purpose is to increase or decrease the value of the active cell by 0.1, 0.01, 0.001, etc. I also wanted the up/down keyboard arrow keys to function the same as clicking the up or down buttons, and the left/right arrow keys to switch the focus across the buttons. I've got this behavior worked out... mostly. Switching from one SpinButton to another with left/right works fine. Activating the buttons with up/down causes the addition/subtraction to fire twice. Clicking the SpinButtons works as normal. Why does clicking the SpinButton work as desired, but using the arrow keys causes values to be doubly incremented/decremented?

    2. The math related to the SpinButtons is written directly in VBA as the digit 1 in the appropriate tenth/hundredth/etc place. Spinning up a certain amount then down the same amount results in changes being made at a MUCH smaller level (using the first button up four times, then down four times results in a value of 2.78E-17). Why is this happening and how can I make it stop?
    Attached Files Attached Files
    Last edited by 79590; 12-10-2015 at 10:31 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Keep Header Row out of Spinbutton UserForm
    By guitarsweety in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2014, 07:18 PM
  2. How to pass a variable value from a Userform listbox/spinbutton to another sub
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2014, 01:01 PM
  3. [SOLVED] UserForm SpinButton to increment Time after TextBox Entry
    By GRazor71 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2013, 01:10 PM
  4. Spinbutton userform increase/decrease current cell on worksheet
    By Stingone in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-21-2012, 03:56 PM
  5. Problems with a Userform (dynamic userform)
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-19-2010, 09:16 AM
  6. Spinbutton to cyle backwards/forwards on Multipage Userform?
    By MattMatt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-22-2008, 09:50 AM
  7. Userform SpinButton problem
    By Ozgur Pars in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2006, 04:10 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