View Single Post
Old 01-03-2009, 04:11 AM   #8
wutamess wutamess is offline
MVP
 
wutamess's Avatar
 

Join Date: Aug 2000
Location: Lee's Summit
Casino cash: $4711637
Quote:
Originally Posted by nstygma View Post
yep

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

Great! Thank you very much.
Posts: 8,290
wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.wutamess has just been standing around suckin' on a big ol' chili dog.
    Reply With Quote