All my macros are receiving Automation error when performing sort functions

clovely

New Member
Joined
Jun 9, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Today when I when I run macros that worked fine yesterday(and several months before) they throw this error when they hit a sort operation:

1623272174484.png


Here is a sample of the code that is errors. The orange code is highlighted yellow in the VBA editor when I debug:

vEnd = Range("B65536").End(xlUp).Row
ActiveWorkbook.Worksheets("Backlog").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Backlog").Sort.SortFields.Add Key:=Range( _
"C4:C" & vEnd), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers


Any previously fine macro that has a sort operation is throwing this error. Also if I record a new macro and sort a file then try to rerun that macro I will get the same error. I tried doing a repair on my Office and still get the error. I am currently stuck and not sure what to try to fix this.

This is on a Windows 10 PC running Office 365.
 

clovely

New Member
Joined
Jun 9, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Our local IT guy had me delete the Excel folder in the registry and that seems to have fixed my issue:
1623771872387.png


I will continue using Excel for the day and see if this issue is truly resolved and update this post.
 
Solution

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

clovely

New Member
Joined
Jun 9, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
The deletion of the Excel file in the registry has fixed my issues. I will note that this set all the options to default, but did not remove my custom ribbon or my personal macros.

Thanks everyone for your assistance. Several good ideas were given and tried.
 

Forum statistics

Threads
1,144,342
Messages
5,723,821
Members
422,518
Latest member
quack_quack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top