![]() |
Why code work in 2003 but not 2000?
The following code works fine in 2003 but not in 2000. Any idea why?
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$E$6" Or Target.Address = "$E$8" Then Application.ScreenUpdating = False Sheets("Ranking Detail").Range("B10:W32").Sort Key1:=Sheets("Ranking Detail").Range("F10"), Order1:=xlDescending, Header:=xlGuess _ , OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("C2").Select updte End If End Sub Cheers, Job |
Why code work in 2003 but not 2000?
I believe the DataOption argument was added in 2002 or 2003. Omit
it from your code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Job" wrote in message ... The following code works fine in 2003 but not in 2000. Any idea why? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$E$6" Or Target.Address = "$E$8" Then Application.ScreenUpdating = False Sheets("Ranking Detail").Range("B10:W32").Sort Key1:=Sheets("Ranking Detail").Range("F10"), Order1:=xlDescending, Header:=xlGuess _ , OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("C2").Select updte End If End Sub Cheers, Job |
Why code work in 2003 but not 2000?
Perfect. Thanks!
"Chip Pearson" wrote in message ... I believe the DataOption argument was added in 2002 or 2003. Omit it from your code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Job" wrote in message ... The following code works fine in 2003 but not in 2000. Any idea why? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$E$6" Or Target.Address = "$E$8" Then Application.ScreenUpdating = False Sheets("Ranking Detail").Range("B10:W32").Sort Key1:=Sheets("Ranking Detail").Range("F10"), Order1:=xlDescending, Header:=xlGuess _ , OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("C2").Select updte End If End Sub Cheers, Job |
All times are GMT +1. The time now is 10:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com