Option Explicit
Private Const MDP As String = "MDP"
[COLOR=blue][B]Private Sub Worksheet_BeforeDoubleClick[/B][/COLOR](ByVal Target As Range, Cancel As Boolean)
Dim SortAddress As String
With ActiveSheet
.Unprotect MDP
If Intersect(ActiveCell, Range("A1").CurrentRegion) Is Nothing Then Exit Sub
SortAddress = ActiveCell.Address(0, 0)
.Range("A1").CurrentRegion.Sort Key1:=Range(SortAddress), Order1:=xlAscending, Header:=xlYes
.Protect MDP
End With
Cancel = True
[COLOR=blue][B]End Sub[/B][/COLOR]