+ Reply to Thread
Results 1 to 5 of 5

Conditional Spin Button

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Conditional Spin Button

    I currently have a spin button that is used to increase/decrease a number in one cell. I also have 10 other cells that also have numbers in them. Basically this form is used to see how many tasks I complete every hour.

    The problem is that I have to manually change the linked cell every hour to the next cell otherwise it will stay on the one cell. I already have a way to evaluate which cell the button should be addressing based on the hour, but I do not know how to make the spinner link conditionally.

    Can this be done?
    Last edited by liero116; 12-14-2010 at 05:17 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Conditional Spin Button

    Hello liero116,

    Welcome to the Forum!

    If you post your workbook for review, I will be able to answer your questions quickly and correctly. Otherwise, it could take a lot of questions and answers before it gets solved.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-10-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Conditional Spin Button

    Attached is an example of my sheet. As you can see in D5, the row number that I would like the left-most spinner button to be accessing is there. D5 changes based on the hour.
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Conditional Spin Button

    Hello liero116,

    I replaced the Forms spin button with an Control Toolbox spin button.The Forms spin button updated the cell before the macro could determine which cell was to be updated. Now the current value of the cell is checked before anything is added or subtracted from it.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-10-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Conditional Spin Button

    This definitely worked. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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