Excel 2016 Office 365 VBA .Sort method not working on one PC

Copper Contributor

I can use the Data , Sort UI and it works - apart from the oddity that hyphens are ignored so "None" is sorted before "Non-fit" but after "Non-aligned" (Excel doc says that apostrophes are ignored too)

But if I use the classic 2003 VBA range.Sort method with one key, text values only, the data does not sort, it continues immediately to the next line without sorting or raising an error. On the PC where it does sort, there is a noticeable lag while it sorts.  It fails on only on one PC, a new laptop (Thinkpad X1, Core i7, 16GB RAM, 500GB SSD). It works fine on the 3 year old desktop. Both Excel 2016 build  9126, Office 365 Proplus, 64-bit.

A test .Sort sub on the laptop works which is unhelpful. It only happens in a larger sub.

I have Repaired the installation. No difference. What could it be?

 

 Added the next day:

For comparison, Excel 2013 on the same PC works perfectly.

 

It's even worse. The 2016 macro recorder is generating rubbish with syntax errors.

Stuff like

 Range("B3").ErrorString
. = "a"
Range("B3").ErrorString
ThemeColor.("Sheet1")..Delete.SoftEdge

It looks like the 2016 installation is corrupted. But I just did an online repair. 

 

Solution: Uninstall and Reinstall. It works then.

 

But MS, I have to say it's very worrying if a failed install creates an app that *appears* to work but actually fails in a way that is not obvious and generates incorrect results which may then be published  by a user unaware of the defect.  If I hadn't tried the macro recorder I wouldn't have realised the problem was a bad install.  You need to have some extra checks there.

 

 

 

 

0 Replies