When I want to [tt]Sort[/tt] the data in Excel, and I record a macro to give me the syntax in VBA, I get:
But other versions of Excel (32-bit vs 64-bit) will not take [tt]Add2[/tt], I need to change it to just [tt]Add[/tt]:
because if I leave [tt]Add2[/tt], my app will crash with "Object doesn't support this property or method" error on other computers. :-(
What's the difference between [tt]Add[/tt] and [tt]Add2[/tt]? And why does Excel give me [tt]Add2[/tt]?
---- Andy
There is a great need for a sarcasm font.
Code:
ActiveWorkbook.Worksheets("DATA").Sort.SortFields.Add[highlight #8AE234]2[/highlight] Key:=Range("D2:D65"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
But other versions of Excel (32-bit vs 64-bit) will not take [tt]Add2[/tt], I need to change it to just [tt]Add[/tt]:
Code:
ActiveWorkbook.Worksheets("DATA").Sort.SortFields.[highlight #FCAF3E]Add[/highlight] Key:=Range("D2:D65"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
because if I leave [tt]Add2[/tt], my app will crash with "Object doesn't support this property or method" error on other computers. :-(
What's the difference between [tt]Add[/tt] and [tt]Add2[/tt]? And why does Excel give me [tt]Add2[/tt]?
---- Andy
There is a great need for a sarcasm font.