+ Reply to Thread
Results 1 to 4 of 4

How Do I Autofit To Screen Size

  1. #1
    tweacle
    Guest

    How Do I Autofit To Screen Size


    I have a worksheet with buttons which have macro's assigned to it.

    Trouble is where I want to use this workbook all the monitors are
    different sizes. When I set it up on my screen (a large one) it does
    not all show on a small screen.

    If I set it up on a small screen I have to freeze the cells so that I
    can keep to show on a large screen. The reason I freeze the cells also
    is so that you cannot scroll up and down the page.

    Can anyone help as to how I can set the screens up so it covers the
    whole screen if set up on a large screen but used on a small one and if
    I can freeze the panes so I cant scroll them.

    Many Thanks


    --
    tweacle

  2. #2
    Ken Johnson
    Guest

    Re: How Do I Autofit To Screen Size

    Hi tweakle,
    Say you want the workbook to open so that the rightmost visible column
    is column V because the rightmost button is in line with column V, then
    the following code placed in the ThisWorkbook code module will achieve
    that, and all of your buttons will be visible.
    Change the Range address to suit your needs.

    Private Sub Workbook_Open()
    Range("A1:V1").Select
    ActiveWindow.Zoom = True
    Range("A1").Select
    End Sub


    1.Copy the above code
    2.Right Click any worksheet tab then select "View code" from the
    contextual popup menu.
    3.If the Project Explorer is not visible the go View>Project Explorer.
    4.Look for the ThisWorkbook icon then double click to open up its code
    module.
    5.Paste the code.
    6. Return to Excel worksheet by pressing Alt + F11 or going File>Close
    and Return to Microsoft Excel.
    7. Close your workbook and reopen to check the effect of the code.

    Ken Johnson


  3. #3
    tweacle
    Guest

    Re: How Do I Autofit To Screen Size


    Ken Johnson Wrote:
    > Hi tweakle,
    > Say you want the workbook to open so that the rightmost visible column
    > is column V because the rightmost button is in line with column V,
    > then
    > the following code placed in the ThisWorkbook code module will
    > achieve
    > that, and all of your buttons will be visible.
    > Change the Range address to suit your needs.
    >
    > Private Sub Workbook_Open()
    > Range("A1:V1").Select
    > ActiveWindow.Zoom = True
    > Range("A1").Select
    > End Sub
    >
    >
    > 1.Copy the above code
    > 2.Right Click any worksheet tab then select "View code" from the
    > contextual popup menu.
    > 3.If the Project Explorer is not visible the go ViewProject Explorer.
    > 4.Look for the ThisWorkbook icon then double click to open up its code
    > module.
    > 5.Paste the code.
    > 6. Return to Excel worksheet by pressing Alt + F11 or going FileClose
    > and Return to Microsoft Excel.
    > 7. Close your workbook and reopen to check the effect of the code.
    >
    > Ken Johnson





    Many Thanks


    --
    tweacle

  4. #4
    Ken Johnson
    Guest

    Re: How Do I Autofit To Screen Size

    You're welcome Tweacle. Thanks for the feedback.
    Ken Johnson


+ 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