M
Martin Wheeler
xl2000
The sub SortbyRank is not working for some reason. Instead all I am getting
is the selected range("CE7:CL26") on each worksheet
Should I be doing some sort of "For each sheet" in addition to what I am
already doing?
SortbyRank runs of Test
Any help would be appreciated.
Ta,
Martin
Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
With wks
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Application.ScreenUpdating = True
End With
End Sub
Public Sub Test()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Left(wks.Name, 1) = "R" Then
With wks
SortbyRank wks
End With
End If
Next
End Sub
The sub SortbyRank is not working for some reason. Instead all I am getting
is the selected range("CE7:CL26") on each worksheet
Should I be doing some sort of "For each sheet" in addition to what I am
already doing?
SortbyRank runs of Test
Any help would be appreciated.
Ta,
Martin
Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
With wks
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Application.ScreenUpdating = True
End With
End Sub
Public Sub Test()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Left(wks.Name, 1) = "R" Then
With wks
SortbyRank wks
End With
End If
Next
End Sub