When this code runs, it doesn't allow the user to sort or filter data in the table on the sheet.
        Dim myPassword As String
    myPassword = "vendorlist"

Cells.Select
    Selection.Locked = True
    Selection.FormulaHidden = False
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:= _
        True, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
        AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
        AllowUsingPivotTables:=True
    ActiveSheet.Protect myPassword
    Cells("A1").Select