Hey All,
I have the following code in one of my Excel files. Using it to automatically filter team based on what is selected on the home screen.
There are various charts which are then processed based on the filter selection.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.AutoFilterMode = False
Worksheets("Admin").Range("B166:V166").AutoFilter
Worksheets("Admin").Range("B166:V166").AutoFilter Field:=3, Criteria1:=Worksheets("Admin").Range("C8").Text
End Sub
All was fine until yesterday, I haven't made any major change or renamed anything in the file. Getting all sorts of errors today. Apparently, it works fine when I just select 'continue'.
Two errors I have received today.
1.) Code execution interrupted - Searched and found that this can be resolved just my hitting Cntrl+Break and/or restarting the system. Didn't happen again.
2.) Subscript out of range (Error 9)
Disappeared when I selected continue, closed and reopened the file.
I am fine if this is one-off but if these errors come, they affect user confidence in the authenticity of the reports. Scares them away, if you guys know what I mean.
Cheers!
I have the following code in one of my Excel files. Using it to automatically filter team based on what is selected on the home screen.
There are various charts which are then processed based on the filter selection.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.AutoFilterMode = False
Worksheets("Admin").Range("B166:V166").AutoFilter
Worksheets("Admin").Range("B166:V166").AutoFilter Field:=3, Criteria1:=Worksheets("Admin").Range("C8").Text
End Sub
All was fine until yesterday, I haven't made any major change or renamed anything in the file. Getting all sorts of errors today. Apparently, it works fine when I just select 'continue'.
Two errors I have received today.
1.) Code execution interrupted - Searched and found that this can be resolved just my hitting Cntrl+Break and/or restarting the system. Didn't happen again.
2.) Subscript out of range (Error 9)
Disappeared when I selected continue, closed and reopened the file.
I am fine if this is one-off but if these errors come, they affect user confidence in the authenticity of the reports. Scares them away, if you guys know what I mean.
Cheers!