+ Reply to Thread
Results 1 to 4 of 4

Adjust a Userforms Zoom based on screen resolution.

  1. #1
    Registered User
    Join Date
    06-12-2010
    Location
    Hereford, England
    MS-Off Ver
    Excel 2003
    Posts
    73

    Adjust a Userforms Zoom based on screen resolution.

    Hi all,

    I have a userform that opens up to full screen regardless of the screen size. However the items populated within the userform are static. So if someone opens the userform on a small screen then they are missing visible information. I can add scroll bars but i'd much prefer all the information be visible upon opening the userform and not use scrolls bars. I figure that there must be a way to have an IF arguement that says if the screen resolution is a certain size then the userforms Zoom is a certain amount

    Eg. I open the userform on my laptop at 1366 x 768 and the userform opens at 100 zoom but if a colleague opens it on their notebook which is 800 x 600 then the userform opens at 80 zoom.

    The arguement would firstly need to find the screen resolution for the device opening the userform.

    Can anyone help with this problem

    Thanks in advance
    Kind Regards

    Baz

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Adjust a Userforms Zoom based on screen resolution.

    Found this some time ago but never had a chance to test it but perhaps this could be of help?

    Please Login or Register  to view this content.
    and the function for "DisplayVideoResolution"

    Please Login or Register  to view this content.
    Alf

  3. #3
    Registered User
    Join Date
    06-12-2010
    Location
    Hereford, England
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Adjust a Userforms Zoom based on screen resolution.

    Thanks Alf,

    I'll try it out and see if it works. A quick question tho. Can I place both the declare function and the sub within the userform initialise?

    I did come up with a simple work around for me that may be of use to a percentage of other excel amateurs. If your excel document is exclusive to a company server then you can use the if arguement for specific usernames.

    Please Login or Register  to view this content.
    All you'd need to know is the screen resolution of the computer that they log into and adjust the zoom size accordingly. Of course this is a work around only. It's not a solution because it doesn't help if the document isn't on a server, if there are 100's of users or if users are logging on to different computers using their usernames.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Adjust a Userforms Zoom based on screen resolution.

    Can I place both the declare function and the sub within the userform initialise
    You don't need to AFAIK because if usefom contains "DisplayVideoResolution" that will trigger the function.

    Not sure if both can be placed within the userform initialization.

    Perhaps a macro that is supposed to make the userform fill the screen? Again something found on the internet and not tested by me.

    Please Login or Register  to view this content.
    Alf

    Ps Sorry about using you as a "Guinea pig" but I saw this as a chance to test these codes.

+ 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] Adjust screen resolution automatically to fit all screen sizes
    By Ace_XL in forum Excel General
    Replies: 2
    Last Post: 06-14-2012, 08:51 AM
  2. Macro to adjust zoom percentage depending on users screen resolution?
    By Smeddlesboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2011, 06:45 AM
  3. Screen Resolution
    By Jason Zischke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2006, 11:40 AM
  4. Can't get screen resolution
    By StevenS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2005, 09:10 AM
  5. [SOLVED] Screen Resolution
    By Ronbo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-17-2005, 10:06 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