Hello,
I have recorded a macro to sort each column alphabetically in a workbook.
It works perfectly on our 2 computers that are windows 10 but not on the
windows 7 computer. Below is the macro.
Is this a common problem?
Sub SuburbSort()
'
' SuburbSort Macro
'
'
Columns("A:A").Select
ActiveWorkbook.Worksheets("TO DO LIST").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("TO DO LIST").Sort.SortFields.Add2 Key:=Range("A1") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("TO DO LIST").Sort
.SetRange Range("A2:I147")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A2").Select
End Sub
Regards,
LLPlates
I have recorded a macro to sort each column alphabetically in a workbook.
It works perfectly on our 2 computers that are windows 10 but not on the
windows 7 computer. Below is the macro.
Is this a common problem?
Sub SuburbSort()
'
' SuburbSort Macro
'
'
Columns("A:A").Select
ActiveWorkbook.Worksheets("TO DO LIST").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("TO DO LIST").Sort.SortFields.Add2 Key:=Range("A1") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("TO DO LIST").Sort
.SetRange Range("A2:I147")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A2").Select
End Sub
Regards,
LLPlates