I have a table that, when sorted, needs the rows to be autofit so they adjust to the user can see what's in all the rows and such. Not every row has extra info, so when the rows get sorted/filtered, etc. they don't keep their individual row heights. By the way, if there's a way around that, please let me know.
So at the end of one of these subroutines I wrote, I put:
Another problem is that when you autofit all the rows, it visually removes the filtering, so the 'ReSort' sub just reapplies whatever sort was last used.
I thought the Application.EnableEvents would prevent the combo box from retriggering itself, but that's not working. Even with that code in there, the combo box thinks something has changed, so the combo box code runs again and triggers the whole set of routines. The problem is that, when the whole routine gets triggered again, for whatever reason I get an error. Forget the error for now. Is there a way to keep the combo box from thinking it got changed?
Thanks!
Thanks!!
Matt
So at the end of one of these subroutines I wrote, I put:
Code:
Application.EnableEvents = False
Rows.AutoFit
ReSort
Application.EnableEvents = True
Another problem is that when you autofit all the rows, it visually removes the filtering, so the 'ReSort' sub just reapplies whatever sort was last used.
I thought the Application.EnableEvents would prevent the combo box from retriggering itself, but that's not working. Even with that code in there, the combo box thinks something has changed, so the combo box code runs again and triggers the whole set of routines. The problem is that, when the whole routine gets triggered again, for whatever reason I get an error. Forget the error for now. Is there a way to keep the combo box from thinking it got changed?
Thanks!
Thanks!!
Matt