Hi,
I am trying to loop a one worksheet (name of that worksheet was Booking)recorded macro through all the sheets in the workbook.
The recording was to sort data within a range alphabetically.
No security issues I am aware of.
If anyone could amened the following code to this, that'd be great! Thanks inadvance.
--------------------------------------------------------
Sub ShootSort()
'
' ShootSort Macro
‘
'
Range("E8:J27").Select
ActiveWorkbook.Worksheets("Booking").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Booking").Sort.SortFields.AddKey:=Range("J8:J27") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Booking").Sort.SortFields.Add Key:=Range("E8:E27")_
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Booking").Sort
.SetRange Range("E8:J27")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
I am trying to loop a one worksheet (name of that worksheet was Booking)recorded macro through all the sheets in the workbook.
The recording was to sort data within a range alphabetically.
No security issues I am aware of.
If anyone could amened the following code to this, that'd be great! Thanks inadvance.
--------------------------------------------------------
Sub ShootSort()
'
' ShootSort Macro
‘
'
Range("E8:J27").Select
ActiveWorkbook.Worksheets("Booking").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Booking").Sort.SortFields.AddKey:=Range("J8:J27") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Booking").Sort.SortFields.Add Key:=Range("E8:E27")_
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Booking").Sort
.SetRange Range("E8:J27")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub