I have the following line of code that is causing the "Automation Error Exception Occurred" error. Works fine in other versions of Office.I tried to record a macro to see how Office 2016 handles clearing a sort, but using that code just caused errors. Any help would be appreciated.
Code:
ActiveWorkbook.Worksheets("CSM Import").AutoFilter.Sort.SortFields.Clear