Forum Discussion
Carlo74
Jun 26, 2020Copper Contributor
Excel vba sort error on one pc with office 2016
Please hepl ! I have this macro that calculates distance using google maps api. and it works fine on all pc.s I have tryed except one. it stops on sort, really stupid sort line . I can't figu...
2TooManyBits
Jun 04, 2023Copper Contributor
I know this problem was a very long time ago, however I had this error at my work and in case someone else needs the answer.
The problem is that in Excel 2016 there is no sort Key#. Delete the number after the key and it should work on Excel 2016.
Sheet3.Range(Sheet3.Cells(6, 3), Sheet3.Cells(5 + br3, 7)).Sort Key1:=Sheet3.Range("G" & 6 & ":G" & 5 + br3), Order1:=xlAscending, Header:=xlNo