Closed Thread
Results 1 to 5 of 5

auto-size userforms

  1. #1
    john.9.williams@bt.com
    Guest

    auto-size userforms

    Hi,

    Is there a way in which I can auto-size a userform to fit the whole
    screen , dependent on moniter size.

    regards

    John


  2. #2
    Ardus Petus
    Guest

    Re: auto-size userforms

    This should maximize de Userform's dimension within Excel Window:

    Private Sub UserForm_Initialize()
    Me.Height = Application.Height
    Me.Width = Application.Width
    End Sub

    HTH,

    --
    AP

    <john.9.williams@bt.com> a écrit dans le message de
    news:1140428713.819554.62300@f14g2000cwb.googlegroups.com...
    > Hi,
    >
    > Is there a way in which I can auto-size a userform to fit the whole
    > screen , dependent on moniter size.
    >
    > regards
    >
    > John
    >




  3. #3
    Norman Jones
    Guest

    Re: auto-size userforms

    Hi John,

    Try:

    '=============>>
    Private Sub UserForm_Initialize()
    Application.WindowState = xlMaximized
    With Application
    Me.Top = .Top
    Me.Left = .Left
    Me.Height = .Height
    Me.Width = .Width
    End With
    End Sub
    '<<=============


    ---
    Regards,
    Norman



    <john.9.williams@bt.com> wrote in message
    news:1140428713.819554.62300@f14g2000cwb.googlegroups.com...
    > Hi,
    >
    > Is there a way in which I can auto-size a userform to fit the whole
    > screen , dependent on moniter size.
    >
    > regards
    >
    > John
    >




  4. #4
    john.9.williams@bt.com
    Guest

    Re: auto-size userforms

    Thanks

    This works great, however on one of my forms I have a listbox, I have
    added the code to this form, but it makes the form to big, any ideas

    John


  5. #5
    john.9.williams@bt.com
    Guest

    Re: auto-size userforms

    Forget the last post I have sorted it now, thanks guys great advice

    John


Closed 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