ShowAllData will only work if there is a filter on your sheet, otherwise it will break. I found that you can create a function from this using On Error Resume Next , and it should work in all cases:
Sub ShowAllData() On Error Resume Next Worksheets("Sheet1").ShowAllData End Sub
Then call the function from your main unit:
Sub Main() ShowAllData End Sub
source share