Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jeremy,
You need to reference the table in the worksheet not just the worksheet. The "If/End If " is not required if you simply want to ensure AutoFilter is Off. Example 1: Sub TablesAndAutoFilter() Dim ws As Worksheet Dim objList As ListObject Set ws = ActiveWorkbook.Worksheets("Sheet1") Set objList = ws.ListObjects("Table2") If objList.ShowAutoFilter Then 'Omitted if simply turning off objList.ShowAutoFilter = False End If 'Omitted if simply turning off End Sub Example 2: Without assigning to variables and simply ensuring that autofilter is off. ActiveWorkbook.Worksheets("Sheet1") _ .ListObjects("Table2") _ .ShowAutoFilter = False -- Regards, OssieMac |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to turn pivot table field on and off | Excel Programming | |||
How do I turn off the autoformat that converts 1-0 to Jan-00? | Excel Discussion (Misc queries) | |||
Can I "customize" an autoformat report for a Pivot Table in Excel | Excel Discussion (Misc queries) | |||
How do I turn off autoformat for .CSV (comma delimited) files? | Excel Discussion (Misc queries) | |||
How do I turn off ALL autoformat in Excel ? (I can't even type "J. | Excel Worksheet Functions |