I wrote code that on the click of a button "FILTER", the code will automatically convert several ranges into individual ListObjects and then filter out blanks and zeros from one of the columns.
Then on the click of another button "UNFILTER", it will automatacally unfliter the table and convert the ListObject back into a range.
Here's the code:
To Filter:
To Unfilter:
where Ows is an ActiveSheet variable
The code works just fine. Here is the problem.
When I click FILTER and the range converts to a ListObject, several of the narrow columns automatically widen to fit the the width of the header text. I had set the column width to 8, and set the cell format for "wrap text", but upon conversion from range to ListObject, the text does not "wrap" and the row does not widen to accomodate wrapped text. Instead the column widens, which is what I don't want since it becomes too wide to print.
Anyone have any suggestions on how to fix this?
Bookmarks