1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Creating a reset button in Excel

Discussion in 'Business Applications' started by robj, Jul 6, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. robj

    robj Thread Starter

    Joined:
    Jul 5, 2003
    Messages:
    25
    I have a simple s/sheet containing basic formulae for introducing the concept of modellng to young pupils.
    How do I create a "Reset" button so that after entering/changing variables the s/sheet can be quickly put back to the starting position? (ie not using the undo icon continually!)
     
  2. mrwendal

    mrwendal

    Joined:
    Jul 25, 2001
    Messages:
    377
    Probably one of the quickest and simplest ways is to record a macro under the Tools option.

    Click on record new macro and then delete the contents of all cells that have entries that you don't want to keep.

    You can then attach this macro to a button on the spreadsheet, or even put a button on the toolbar and whenever you wish to revert back, just click the button!

    Does this make sense - or have i got the wrong end of the stick?

    Mind you, this will only work if the same cells are being deleted each time.
     
  3. robj

    robj Thread Starter

    Joined:
    Jul 5, 2003
    Messages:
    25
    Thanks for reply.
    I guessed I'd need a macro (haven't done them yet, but now's the time to learn!).

    Possible problem is that different info will be added each time so won't be able to determine in advance what content will need to be deleted. The macro will need to "tell Excel" to go back to its "start position" irrespective of what has ben done to it; and withkids that could be quite a lot!
     
  4. mrwendal

    mrwendal

    Joined:
    Jul 25, 2001
    Messages:
    377
    Well, maybe the answer is not to record a macro to 'undo' everything.

    Perhaps the answer should be to create a macro to 'create' the defaults you want to see.

    For example, with a blank worksheet, click on Tools, then Macros and then Record Macro.

    First off, you would want to delete everything (don't worry, I know nothing is there!), so click the 'Select All' button (little square located left of the 'A' and above the '1').

    With the macro still recording, press Edit, then Clear and then All, to delete the contents of all the cells in question.

    Proceed to fill in the cells with the default formulae, etc, that you want to see each time at the start.

    Once you are happy with this, click on the 'Stop Recording Macro' button.

    --

    Now to add a button to your menu (if you want to that is!)

    Right click on the toolbar (next to Help, etc) and select Customize.
    On the Commands tab that appears, select Macro in the left-hand window and drag the Custom Button icon to where you want it on the toolbar.

    Once this has been done, right-click on your new menu item and select Assign Macro. Choose the macro you just created from the list that appears and close the customize window.

    Now, each time a pupil has done their worst (!), all you have to do is click on your new button and it will reset the form to how you set it up first time round!

    ---

    Hope this is what you are after.....
     
  5. robj

    robj Thread Starter

    Joined:
    Jul 5, 2003
    Messages:
    25
    Just seen your post - sounds just the job! Too late to try tonight, but will PM you with the good/bad news! Cheers.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/144822