How do I detect, in VBA, that a user has resized a column?
How do I detect, in VBA, that a user has resized a column?
If you had that information, what would you do next? That might affect the answer.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
In my application, the user can change row and column sizes but I need to know when they do it because they can only make a column a minimum size and rows can only be a maximum size. It I know it was changed, I can check the size and resize it if needed.
Well, manual column width changes are not something that Excel "watches" in realtime, irritating, I know. So you would have to check the column widths at some other time.
Let's make a macro that checks the columns you want, then trigger it some other time. Put this into a regular code module:
![]()
Please Login or Register to view this content.
Then let's use BeforeSave and BeforePrint events to trigger the "check". In the ThisWorkbook module:
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks