+ Reply to Thread
Results 1 to 5 of 5

Resizing code for userform

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,942

    Resizing code for userform

    Hi Guys,

    i found this awesome code from @Andy Pope here:

    https://www.andypope.info/vba/resizeform.htm

    (you can download sample from this site)

    Everything is working awesome but when you decrease userform only to top label size you have to turn off userform and start once again to increase its size once again:

    Screenshot_48.png

    Can i automatically expand userform in this case or not allow to fully decreasie userform size?

    Best,
    Jacek

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,450

    Re: Resizing code for userform

    Add a couple of properties to the class which specify minimum width and height.
    In the layout event check new values are not below the minimum sizes
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,942

    Re: Resizing code for userform

    Let me try what you just wrote.

    And where can i put also resizing all objects within class?
    I mean if i have commandbutton i want to resize it when i am resing userform in the same time?

    Best,
    Jacek

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,450

    Re: Resizing code for userform

    See this on how to anchor/size controls
    https://www.andypope.info/vba/Anchor.htm

    An alternative is to use the zoom factor of the userform

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,942

    Re: Resizing code for userform

    thank you!!!!

    Jacek

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Resizing a Printed Userform
    By Jaredm577 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2019, 02:41 AM
  2. Resizing print output of userform
    By IMM Tech in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2018, 08:38 PM
  3. Minimize-Maximize-Resizing-Scrolling in a Userform
    By ochyld in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2018, 04:33 PM
  4. [SOLVED] Resizing UserForm from a command button on WS
    By DonG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2016, 01:03 AM
  5. resizing image in userform
    By sammu78 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 09:25 AM
  6. Resizing lists when userform is open
    By Skybeau in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-26-2011, 09:44 PM
  7. Resizing Userform to screen size
    By Al@n in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2006, 05:30 PM

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