+ Reply to Thread
Results 1 to 6 of 6

Linking Spin Button to active cell in worksheet

  1. #1
    Registered User
    Join Date
    12-07-2013
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Linking Spin Button to active cell in worksheet

    I am trying to add one spin button that will be able to be used to increase/decrease any active cell in a data worksheet. The data worksheet has rows which are half hour timeslots and the columns are the type of work that is being completed. For example, from 8:30-9:00 (row 2) we need to keep track of the number of clients seen (Column B), number of payments received (column C), etc. What I need is for the staff to be able to click on cell B2 for instance and then use the spin button to increase the number in that cell by one each time they see a client in the applicable half hour timeslot. Then be able to click on cell C2 and using the same spin button, increase that cell by 1. This needs to be able to happen throughout the entire worksheet. I am wondering if anyone would be able to help me out with the correct VBA coding for this worksheet.

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Linking Spin Button to active cell in worksheet

    I don't know if you can use a single spin button for multiple cells.
    But you could use just a regular button and have code to increase the value of the selected cell by one.
    BTW, Are you not afraid the spin button will freeze with the temperatures you have!!!!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-07-2013
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Linking Spin Button to active cell in worksheet

    Thanks so much for responding so quick. It works great! It is really cold here!!! I have family that live near a huge lake in central Saskatchewan and after last night it now has over 4 inches of ice on it (the lake is almost 2km wide and is over 300 feet deep in the middle) Many cars aren't starting today even if you had the block heater plugged in! It's crazy! We normally don't get this cold till January

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Linking Spin Button to active cell in worksheet

    Good to hear that you can work with it.
    The weather is not much better here in Edmonton but the end is in sight (March???)

  5. #5
    Registered User
    Join Date
    08-14-2019
    Location
    Boston, US
    MS-Off Ver
    2019
    Posts
    1

    Re: Linking Spin Button to active cell in worksheet

    Hi jolivanes; I know this is a long shot as you posted this solution over 6 years ago, but I'm having some issues using your "increase selection" button on certain cells. If i copy the button into my spreadsheet, it works for blank cells, but on other cells I get a "Run-time error ‘13’: Type mismatch’" message. When I go into the vba dialog box it highlights the ".value = .value + 1" line. Any idea how I could fix this? Thank you so much for the solution! It was really helpful.

    I'm basically trying to find a way to add and subtract the numbers of selected cells with a single button. Ideally that button could stay at the top of the screen even if I scroll similar to a freezing a pane. I also want to find a way to copy that button to multiple sheets! Thank you!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Linking Spin Button to active cell in worksheet

    Quote Originally Posted by jacobzuma View Post
    Hi jolivanes; I know this is a long shot as you posted this solution over 6 years ago, but I'm having some issues using your "increase selection" button on certain cells. If i copy the button into my spreadsheet, it works for blank cells, but on other cells I get a "Run-time error ‘13’: Type mismatch’" message. When I go into the vba dialog box it highlights the ".value = .value + 1" line. Any idea how I could fix this? Thank you so much for the solution! It was really helpful.

    I'm basically trying to find a way to add and subtract the numbers of selected cells with a single button. Ideally that button could stay at the top of the screen even if I scroll similar to a freezing a pane. I also want to find a way to copy that button to multiple sheets! Thank you!
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Lock spin button postion in protected worksheet
    By Rocky2013 in forum Excel General
    Replies: 0
    Last Post: 06-11-2013, 11:47 PM
  2. Link spin button to a different cell according to an if statement
    By depastle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2012, 02:51 PM
  3. Spin button link to another cell
    By jnick in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-26-2012, 11:38 AM
  4. Spin Button will not link to cell
    By elliotl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-20-2009, 03:10 PM
  5. Spin Button:spin cells A7
    By ice in forum Excel General
    Replies: 1
    Last Post: 03-16-2007, 02:23 PM

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