+ Reply to Thread
Results 1 to 5 of 5

vba to automatically resize userform depending on screen size

  1. #1
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    203

    vba to automatically resize userform depending on screen size

    I have made for a Userform to make things easier for the users. I have noticed that I have sized the userform to fit a 22 inch desktop screen but it won't fit on laptops and smaller screens.

    Is there a way so that the userform always fits the screen?

    I appreciate beforehand your attention and time.


    Thank you
    Kirana.
    Last edited by kirana2014; 11-29-2016 at 02:15 AM.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: vba to automatically resize userform depending on screen size

    http://www.vbaexpress.com/kb/getarticle.php?kb_id=32

    That should help, but I would suggest setting a static Userform size that will work on all resolutions instead of making one dynamic.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: vba to automatically resize userform depending on screen size

    Hi kirana2014,

    You can use 'ActiveWindow.Height' or 'Application.Height' to determine the maximum visible UserForm height. If the UserForm is larger than the 'maximum visible height', you can add ScrollBars to the UserForm.

    See the attached file which includes UserForm MouseWheel code (32 bit Excel only) at no extra charge. For additional UserForm MouseWheel code see post #23 associated with: http://www.excelforum.com/excel-prog...orm-frame.html

    Please Login or Register  to view this content.
    Lewis

  4. #4
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    203

    Re: vba to automatically resize userform depending on screen size

    Daer Lewis,Mike,


    Thank you so much for your attention and time.

  5. #5
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    203

    Re: vba to automatically resize userform depending on screen size

    Dear Lewis,Mike,


    Thank you so much for your attention and time.

+ 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. Replies: 5
    Last Post: 03-29-2021, 03:01 AM
  2. Automatically resize myTable_1 according to size of myTable_2
    By francisvachon in forum Excel General
    Replies: 1
    Last Post: 07-08-2015, 12:16 PM
  3. Automatically resize numerous images to a cell size
    By Ciarmccabe in forum Excel General
    Replies: 0
    Last Post: 12-03-2013, 06:33 PM
  4. Resize browser control size to match useform full screen
    By jayinthe813 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-16-2012, 03:24 PM
  5. [SOLVED] Resizing Userform to screen size
    By Al@n in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2006, 05:30 PM
  6. [SOLVED] how to let the userform autosize depending on the screen resolution
    By Pierre via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-02-2005, 06:20 PM
  7. how to let the userform autosize depending on the screen resolution
    By Pierre via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-02-2005, 06:17 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