+ Reply to Thread
Results 1 to 9 of 9

Reset Button

  1. #1
    Registered User
    Join Date
    09-05-2011
    Location
    Orange, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Reset Button

    Hi, I created a spin button that allows one to increase or decrease interest rates.

    I am trying to create a reset button that would reset (not clear) the interest rate back to its original starting value.

    Can anyone help me out on the code for the button? I know how to create the button, but I do not know much about coding. I will attach the spreadsheet.
    Attached Files Attached Files
    Last edited by agoo20; 09-06-2011 at 07:36 PM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Reset Button

    hi, agoo20, please check attachment
    Attached Files Attached Files

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Reset Button

    Hi agoo20
    Perhaps this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    09-05-2011
    Location
    Orange, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Reset Button

    Quote Originally Posted by watersev View Post
    hi, agoo20, please check attachment
    Watersev thanks for the reply. The code worked, but I was wondering if you could tell me how the code knows which cell to reset since there is no specific mention of "C3" in the code?

    I took the code and tried using it on a spreadsheet with a lot of adjustable values but it came up with a debugging error for .value = .min.

    Thanks so much!

  5. #5
    Registered User
    Join Date
    09-05-2011
    Location
    Orange, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Reset Button

    Thanks jaslake the code worked.

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Reset Button

    @agoo20
    The code provided uses index value of the shape, you can use spin control name instead to work precisely with particular one. The connected cell is set in it's format options.
    Another option offered by Jaslake is not the one I would go for, because it is referencing a cell and setting some value. In case you will amend spin button options you will need not to forget to change range and value.
    While using my code with name of the control you may change cell reference and min value in control format and it will work as expected.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Reset Button

    to support what I'm talking of, the connected cell is moved to a different cell the code would work because it works on control object level without changes required to Reset button code.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-05-2011
    Location
    Orange, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Reset Button

    Watersev, thank you for clarifying this. I created a new spin button and changed the code you provided to reference the new spin button name and it worked perfectly.

    Thanks so much!

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Reset Button

    if you are happy with the offered solutions, please mark the thread as Solved (see Forum Rule on How to questions: http://www.excelforum.com/forum-rule...rum-rules.html, rule #9

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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