ShowAllData method of Worksheet class failed

后端 未结 7 1383
后悔当初
后悔当初 2020-11-28 10:17

I notice my VBA script doesn\'t work when there\'s an autofilter already on. Any idea why this is?

    wbk.Activate
    Set Criteria = Sheets(\"Sheet1\").Cel         


        
相关标签:
7条回答
  • 2020-11-28 11:06

    I am also the same problem. I think the reason are,

    1) When my activecell is within the table, "ActiveSheet.ShowAllData" can be work. 2) When my activecell not within the table, "ActiveSheet.ShowAllData" cannot work.Using this code, ActiveSheet.ListObjects("Srv").Range.AutoFilter Field:=1 can clear the filter.

    0 讨论(0)
提交回复
热议问题