+ Reply to Thread
Results 1 to 4 of 4

Column width changed by user

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    Michigan
    Posts
    68

    Column width changed by user

    How do I detect, in VBA, that a user has resized a column?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Column width changed by user

    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 the icon 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!)

  3. #3
    Registered User
    Join Date
    10-02-2008
    Location
    Michigan
    Posts
    68

    Re: Column width changed by user

    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.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Column width changed by user

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1