Hi,
I'm not sure if my question is a general Excel question or if it should be a VBA question. My apologies!
I just recently received a new laptop from my IT Service Desk and it came installed with Excel 2016 32 bit. I subsequently requested Excel 2016 64 bit to be installed as that is what I have used in the past. Now whenever I attempt to refresh a pivot table with a custom sort from within my VBA code, Excel abruptly exits with no error messages provided. I previously had a laptop with Excel 2016 64 bit and there were no problems when running this code. If I edit the VBA code so the custom sort is disabled, the refresh will work, but the results won't be sorted in the desired order.
This is the line of code where Excel will abruptly exit:
Custom_Sort_PivotItems ptField:=pt.PivotFields("Level"), vItems:=Array("1-P", "1", "1-HI", "2", "3", "4", "T", "X", "X-OS", "X-TM")
Any thoughts on why this is happening? Thanks for your help!
I'm not sure if my question is a general Excel question or if it should be a VBA question. My apologies!
I just recently received a new laptop from my IT Service Desk and it came installed with Excel 2016 32 bit. I subsequently requested Excel 2016 64 bit to be installed as that is what I have used in the past. Now whenever I attempt to refresh a pivot table with a custom sort from within my VBA code, Excel abruptly exits with no error messages provided. I previously had a laptop with Excel 2016 64 bit and there were no problems when running this code. If I edit the VBA code so the custom sort is disabled, the refresh will work, but the results won't be sorted in the desired order.
This is the line of code where Excel will abruptly exit:
Custom_Sort_PivotItems ptField:=pt.PivotFields("Level"), vItems:=Array("1-P", "1", "1-HI", "2", "3", "4", "T", "X", "X-OS", "X-TM")
Any thoughts on why this is happening? Thanks for your help!