Hi,
This should work.
Note: Code edited.Code:Const HeaderRow As Long = 4 Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Cancel = True If IsEmpty(Target.Value) Then Exit Sub Static MySortType As Integer If MySortType = 0 Then MySortType = xlAscending ElseIf MySortType = xlAscending Then MySortType = xlDescending ElseIf MySortType = xlDescending Then MySortType = xlAscending End If 'Target.CurrentRegion.Offset(1).Sort key1:=Target, order1:=MySortType, Header:=xlYes Target.CurrentRegion.Offset(0).Sort key1:=Target, order1:=MySortType, Header:=xlYes End Sub




Reply With Quote

Bookmarks