Is this what you need Greg?
[VBA]Function SortData(xlSheet As Object)
Dim lastcol As Long
Dim lastrow As Long
With xlSheet
lastcol = .Range("A1").End(xlToLeft).Column
lastrow = .Cells(xlSheet.Rows.Count, 1).End(xlUp).Row
.Sort.SortFields.Clear
.Sort.SetRange .UsedRange
.Sort.SortFields.Add Key:=.UsedRange.Columns(1), _
SortOn:=xlSortValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
With .Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
End Function
[/VBA]
If you are using this code is some other app, you might need this as well
[VBA]Public Enum ExcelConstants
xlYes = 1
xlTopToBottom = 1
xlPinYin = 1
xlUp = -4162
xlToLeft = -4161
xlSortOnValues = 0
xlAscending = 1
xlSortNormal = 0
End Enum[/VBA]