View Single Post
Old 01-03-2009, 04:09 AM   #7
nstygma nstygma is offline
Veteran
 
nstygma's Avatar
 

Join Date: Nov 2008
Location: ¿
Casino cash: $6869775
yep i did not import the macro

Code:
Sub SORT()
'
' Macro2 Macro
'
' Keyboard Shortcut: Ctrl+n
'
Dim ws As Worksheet
For Each ws In Worksheets
ws.Unprotect

'    Range("A3:F34").Select
'    If ActiveSheet.ProtectContents Then
'    ActiveSheet.Unprotect
'    End If
    ws.SORT.SortFields.Clear
    ws.SORT.SortFields.Add Key:=Range("A3:A34") _
        , SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
    With ws.SORT
        .SetRange Range("A3:F34")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
'    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    ws.Protect
Next
End Sub
Posts: 2,237
nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.nstygma Forgot to Remove His Claytex and Got Toxic Shock Syndrome.
    Reply With Quote