+ Reply to Thread
Results 1 to 5 of 5

Automatic Window Sizing

  1. #1
    Registered User
    Join Date
    01-20-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Automatic Window Sizing

    I have the this code in ThisWorkbook to open the workbook with two windows, each with a different tab showing, and each taking up half the screen:

    Please Login or Register  to view this content.
    Is there a way to do make it so that tab2 only takes up about 1/3 of the available screen space and Tab1 gets the rest?

    Thanks,
    Kyle
    Last edited by c_leven3; 02-09-2010 at 01:55 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Automatic Window Sizing

    Hello Kyle,

    There is no built-in function in Excel or VBA to do this. It can be done using the Windows API . However, I am not sure the amount of coding needed to produce the desired result is worth it.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-20-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Automatic Window Sizing

    Bummer. Thanks anyways.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Automatic Window Sizing

    You could try this code. Replace "Book1" with your workbook name
    Please Login or Register  to view this content.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    04-26-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    4

    Re: Automatic Window Sizing

    Hi All,

    I only need to resize my excel window dynamically (depending on user screen sizes) to half of the width.
    What I thought would be a single task kept me awake the whole night and I still can not get it to work.
    Any input massively appreciated.
    Excel 2013
    Code below:

    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)

Tags for this Thread

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