+ Reply to Thread
Results 1 to 3 of 3

vb code Screen size

  1. #1
    Jim
    Guest

    vb code Screen size

    Is there a way to have vb code (in Excel) determine the screensize /
    resolution of the
    computer used to view it. I have a spreadsheet that has custom userforms
    that I have lined up along the right side on my screen, but when it opens
    on another persons computer (with a narrower screen) the forms are cut off.
    Is there a way to determine what the size of the actual display area is
    (both width and height) so that I can adjust the positioning of the
    userforms that I use.


    Always find excellent answers in this group, I appreciate the help.

    Jim

  2. #2
    Registered User
    Join Date
    06-21-2005
    Posts
    19
    Don't think you can get the resolution but you can (optionally) maximize Excel, maximize the active pane and then get the number of points available. You can then use *that* to set column widths & heighs, and pick a font size to fit

    EG


    Application.WindowState = xlMaximized
    With ActiveWindow
    .WindowState = xlMaximized
    MsgBox .Width
    End With

    Gaz
    2B OR NOT 2B, that is FF

  3. #3
    Registered User Ivan F Moala's Avatar
    Join Date
    10-25-2003
    Location
    Auckland, New Zealand
    Posts
    71
    Perhaps something like this may help

    http://www.xcelfiles.com/VB_Quick14.html
    Kind Regards,
    Ivan F Moala From the City of Sails
    \1

+ 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