• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Creating a Reset Button

hreyo25

New Member
Hello all i am currently working on a worksheet where a macro runs and sorts various columns. My question is how can I create a reset button that would restore the sheet its original form. It has around 10,000 rows and most of them are hidden in the orignal format. Any help would be appreciated.
 
Hreyo25
Simply Start the Macro recorder
Perform all the steps to get it back in order
Be careful when selecting ranges to unhide etc that you use the Ctrl Shift Arrows to select ranges, so that Excel will record those steps and not specific cell references

Then edit the code if required
Assign to a Button
 
Thanks for the response Hui, the macro im trying to reset filters the values in column A is there a way to unfilter back to the orginal?
 
Hi, hreyo25!
Tried following Hui's guidelines? Macro recorder will give you the answer.
Regards!
 
Hi, hreyo25!

I'm sure you didn't.

Give a look at the uploaded file. If you had a worksheet like this and had start the macro recorder and simply gone to Data tab, Sort & Filter group, Delete icon, you should have got this code:
Code:
Option Explicit
 
Sub Macro1()
'
' Macro1 Macro
'
 
'
    ActiveSheet.ShowAllData
End Sub
which brute and untouched is just what Hui's recommendation pointed to.

I assume that you could have handled the creation of a command button and assigned the code to be run, in this case just the Macro1 procedure recorded previously. If not, well, you'd better get your hands dirty into VBA if you're planning to work with macros.

Regards!
 

Attachments

  • Creating a Reset Button (for hreyo25 at chandoo.org).xlsm
    20 KB · Views: 4
Back
Top