Can someone tell me why this is not working? I have code that opens another workbook, unprotects it, refresh all, protects it, but allows auto filtering to work.
Application.ScreenUpdating = False
Workbooks.Open Path
Sheet1.UnProtect "password"
Sheet2.UnProtect "password"
ActiveWorkbook.RefreshAll
Sheet1.Protect Password:="password", AllowFiltering:=True
Sheet1.EnableSelection = xlNoRestrictions
Sheet2.Protect Password:="password", AllowFiltering:=True
Sheet2.EnableSelection = xlNoRestrictions
ActiveWorkbook.Save
ActiveWindow.Close
thanks
Bookmarks