Hello I am new to VBA and Excel so please excuse my ignorance on some terminology. My boss uses Excel 7 and I use 365, his code that he has used for 10 years for the Sort function is as follows.
Range("A1:A14").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlYes
or
Range("E1", "F" & b * 2).Sort Key1:=Range("E1"), Order1:=xlAscending, Key2:=Range("E1"), Order2:=xlAscending, Header:=xlYes
This simple one line has worked in hundreds of routines. But now with the new 365 this line of code seems to be bombing out. And when I record a macro for Sort, the code is now several lines longer. Has anyone else run into this issue? Or does someone know a simple way to to condense the new code so that it can remain as one line and not crash in 365?
Thank you.
Range("A1:A14").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlYes
or
Range("E1", "F" & b * 2).Sort Key1:=Range("E1"), Order1:=xlAscending, Key2:=Range("E1"), Order2:=xlAscending, Header:=xlYes
This simple one line has worked in hundreds of routines. But now with the new 365 this line of code seems to be bombing out. And when I record a macro for Sort, the code is now several lines longer. Has anyone else run into this issue? Or does someone know a simple way to to condense the new code so that it can remain as one line and not crash in 365?
Thank you.