I'm re-creating my main work file in Excel 365 (had used 2007 until now).
I copy-pasted what looks like completely standard sorting VBA code (which works just fine) from my 2007 file, but it behaves oddly when run in my new 365 workbook:
>> It runs fine the FIRST time I run it.
>> But if I then immediately try to run it a second time, it returns an "Automation error - the object invoked has disconnected from its clients" error.
See the blue block in image -- that's the offending piece of code. If I comment it out, the VBA runs fine. But if left in, it generates the error / crashes Excel.
EDIT: I was wrong, it's NOT just the blue / sorting piece that causes the crash...I have it commented out, and still getting the error shown / excel-crash. Ugh, so yeah: can't believe this super simple snippet is causing such a weird headache(?)
I copy-pasted what looks like completely standard sorting VBA code (which works just fine) from my 2007 file, but it behaves oddly when run in my new 365 workbook:
>> It runs fine the FIRST time I run it.
>> But if I then immediately try to run it a second time, it returns an "Automation error - the object invoked has disconnected from its clients" error.
See the blue block in image -- that's the offending piece of code. If I comment it out, the VBA runs fine. But if left in, it generates the error / crashes Excel.
EDIT: I was wrong, it's NOT just the blue / sorting piece that causes the crash...I have it commented out, and still getting the error shown / excel-crash. Ugh, so yeah: can't believe this super simple snippet is causing such a weird headache(?)