I have a very big excel work book. I think there are 108 tabs across the bottom. The first 3 are what I work with then the other 105 hold the data. I have a macro that goes to the 105 tabs and sorts them but for some reason, it is throwing me an error.
I'm getting Run-time '-214731767 (80028029)':
Automation error
Invalid forward reference, or reference to uncompiled type.
Nothing has changed with the tabs, this error just pops up every now and then. Usually I just go back to an earlier version of the workbook and it starts working again for a month or so then this same error will pop up.
This is a copy of the code which performs the same task for every worksheet besides the first 3 that are named Data, Answers and Master. Any ideas why I would randomly be getting this error about once every month or so?
I did try to write a loop code so it would be shorter but I am a complete novice when it comes to code.
Sub Sorter()
'CSE
Application.ScreenUpdating = False
'CSE
Sheets("CSE").Select
Range("A1:I800000").Sort _
Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("C1"), Order2:=xlDescending, Header:=xlYes
'AS
Sheets("AS").Select
Range("A1:I800000").Sort _
Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("C1"), Order2:=xlDescending, Header:=xlYes
'AC
Sheets("AC").Select
Range("A1:I800000").Sort _
Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("C1"), Order2:=xlDescending, Header:=xlYes
Appreciate any help or ideas on how to get this error to clear forever.
I'm getting Run-time '-214731767 (80028029)':
Automation error
Invalid forward reference, or reference to uncompiled type.
Nothing has changed with the tabs, this error just pops up every now and then. Usually I just go back to an earlier version of the workbook and it starts working again for a month or so then this same error will pop up.
This is a copy of the code which performs the same task for every worksheet besides the first 3 that are named Data, Answers and Master. Any ideas why I would randomly be getting this error about once every month or so?
I did try to write a loop code so it would be shorter but I am a complete novice when it comes to code.
Sub Sorter()
'CSE
Application.ScreenUpdating = False
'CSE
Sheets("CSE").Select
Range("A1:I800000").Sort _
Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("C1"), Order2:=xlDescending, Header:=xlYes
'AS
Sheets("AS").Select
Range("A1:I800000").Sort _
Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("C1"), Order2:=xlDescending, Header:=xlYes
'AC
Sheets("AC").Select
Range("A1:I800000").Sort _
Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("C1"), Order2:=xlDescending, Header:=xlYes
Appreciate any help or ideas on how to get this error to clear forever.