I have created tables in a workbook which adjust in number of rows based on the number of months that need to be represented. The start and finish date are contained in cells and the adjustment macro runs from a command button using the code snippet below:
The code works great to resize the tables, but the tables loose all but one of the conditional formatting rules I set-up. This wouldn't happen with ranges, but I loose the capabilities to fairly easily resize the tables with code and have the formulas populate correctly.
I know there are some Excel Geniuses out there who can help me.
Code:
If ActiveSheet.ListObjects.Count > 0 Then
For Each oLst In ActiveSheet.ListObjects
oLst.ListRows(oLst.ListRows.Count).Delete
Next oLst
End If
The code works great to resize the tables, but the tables loose all but one of the conditional formatting rules I set-up. This wouldn't happen with ranges, but I loose the capabilities to fairly easily resize the tables with code and have the formulas populate correctly.
I know there are some Excel Geniuses out there who can help me.