pvzshark
Repeated rules violations
- Joined
- Feb 26, 2020
- Messages
- 23
- Office Version
- 2013
- Platform
- Windows
I have also posted it on excelforum: Hide columns with errors?
Good day.
I have been helped to continue if subscript out of range error appears which is working 100%
My next question is how do I now hide the culumn if it has a error on it?
So i am importing data, but the number of rows keep changing, I have done some coding on them but when they are not imported i get errors because they dont exist, that is
why i added "On Error Resume Next" , so my next logical step will be to hide all of them that has no data pulled in,
Cannot delete them as i have columns at end that sums to the right that include them, so i just need to hide the columns.
Regards
Good day.
I have been helped to continue if subscript out of range error appears which is working 100%
My next question is how do I now hide the culumn if it has a error on it?
So i am importing data, but the number of rows keep changing, I have done some coding on them but when they are not imported i get errors because they dont exist, that is
why i added "On Error Resume Next" , so my next logical step will be to hide all of them that has no data pulled in,
Cannot delete them as i have columns at end that sums to the right that include them, so i just need to hide the columns.
Regards

VBA Code:
On Error Resume Next
ActiveSheet.ListObjects("Table_pastel_12_cust_rank").ListColumns(47). _
TotalsCalculation = xlTotalsCalculationSum
On Error Resume Next
ActiveSheet.ListObjects("Table_pastel_12_cust_rank").ListColumns(48). _
TotalsCalculation = xlTotalsCalculationSum