Hello!! Question for you all.
I have a spreadsheet full of data that is sorted by columns/filters. I have a button that clears all filters and shows all the data without any filter. The code behind the button is:
This button works. However, if I am already showing all of the data, aka already ran the button, and I hit the button again I get an error:![]()
Sub ScheduleDataView() Cells.Select ActiveSheet.ShowAllData Range("A4").Select End Sub
Run-Time error '1004': ShowAllData of Worksheet class failed.
How do I manipulate the code so that when I hit the button multiple times I don't get this error but instead the same code is run again? Thanks!
Bookmarks