K
Kieranz
Hello All,
In the General Module I have:
Sub proSortByName()
ActiveWorkbook.Worksheets("Plyrs").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Plyrs").Sort.SortFields.Add Key:=Range
("B10:B80") _
, SortOn:=xlSortOnValues, Order:=xlAscending,
DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Plyrs").Sort.SortFields.Add Key:=Range
("A10:A80") _
, SortOn:=xlSortOnValues, Order:=xlAscending,
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Plyrs").Sort
.SetRange Range("A10:C80")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
In Sheet2 the code:
Private Sub Worksheet_Activate()
Call proSortByName
Sheet2.Range("A3").Select
End Sub
When I select sheet2 the code runs but it is still indicating that
Sheet1 "Plyrs" is selected, how do i get it deselect.
Thks in adv and Rgds
KZ
In the General Module I have:
Sub proSortByName()
ActiveWorkbook.Worksheets("Plyrs").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Plyrs").Sort.SortFields.Add Key:=Range
("B10:B80") _
, SortOn:=xlSortOnValues, Order:=xlAscending,
DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Plyrs").Sort.SortFields.Add Key:=Range
("A10:A80") _
, SortOn:=xlSortOnValues, Order:=xlAscending,
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Plyrs").Sort
.SetRange Range("A10:C80")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
In Sheet2 the code:
Private Sub Worksheet_Activate()
Call proSortByName
Sheet2.Range("A3").Select
End Sub
When I select sheet2 the code runs but it is still indicating that
Sheet1 "Plyrs" is selected, how do i get it deselect.
Thks in adv and Rgds
KZ