BELOW IS CODE TO ENABLE AUTOFILTER ON A worksheet when we dont want the user to adjust the sheet in any other way. I know people have always had trouble with it
With Worksheets("myworksheet")
.EnableSelection = xlUnlockedCells
.Protect DrawingObjects:=True, contents:=True, userInterfaceOnly:=True
.EnableAutoFilter = True
.Protect contents:=True,userInterfaceOnly:=True
End With
This message was edited by Qroozn on 2002-04-17 20:18
With Worksheets("myworksheet")
.EnableSelection = xlUnlockedCells
.Protect DrawingObjects:=True, contents:=True, userInterfaceOnly:=True
.EnableAutoFilter = True
.Protect contents:=True,userInterfaceOnly:=True
End With
This message was edited by Qroozn on 2002-04-17 20:18