VBA Code:
If Not Intersect(Target, Sheets("EMPLOYEE").Range("A1")) Is Nothing Then
Cancel = True
ActiveSheet.Unprotect Password:="testing"
ActiveWorkbook.Worksheets("EMPLOYEE").ListObjects("EList").Sort.SortFields _
.Clear
ActiveWorkbook.Worksheets("EMPLOYEE").ListObjects("EList").Sort.SortFields _
.Add Key:=Range("EList[[#All],[SEN'#]]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("EMPLOYEE").ListObjects("EList").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveSheet.Protect Password:="testing"
End If
VBA Code:
If Not Intersect(Target, Sheets("EMPLOYEE LIST").Range("A1")) Is Nothing Then
any help is greatly appreciated.