+ Reply to Thread
Results 1 to 4 of 4

open a form maximized

Hybrid View

  1. #1
    Registered User
    Join Date
    05-07-2006
    Posts
    19

    open a form maximized

    hello i have been searching and searching,
    but can't find anything about opening a form maximized.

    can anyone tell how to do this?

  2. #2
    Tom Ogilvy
    Guest

    RE: open a form maximized

    You can make the userform larger, but it isn't a zoom type operation - the
    controls on the form will not resize:

    Sub UserForm_Activate()
    With Application
    'maximize Excel
    .WindowState = xlMaximized
    Me.Top = .Top
    Me.Left = .Left
    Me.Height = .Height
    Me.Wdith = .Width
    End With
    End Sub


    Sub FormFit()
    UserForm1.Show
    End Sub


    The above assumes excel is maximized. (I added code to maximize it)


    The activate event is in the Userform code module.

    --
    Regards,
    Tom Ogilvy



    "eyesonly1965" wrote:

    >
    > hello i have been searching and searching,
    > but can't find anything about opening a form maximized.
    >
    > can anyone tell how to do this?
    >
    >
    > --
    > eyesonly1965
    > ------------------------------------------------------------------------
    > eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
    > View this thread: http://www.excelforum.com/showthread...hreadid=539653
    >
    >


  3. #3
    Tom Ogilvy
    Guest

    RE: open a form maximized

    Here is one from Chip Pearson:

    With Application
    UserForm1.Move .Left, .Top, .Width, .Height
    End With
    UserForm1.Show

    Note that both of the suggestions size the useform - they don't make it a
    maximized window which would need to be done using the windows API.
    However, they may be sufficient for what you need.

    --
    Regards,
    Tom Ogilvy







    "Tom Ogilvy" wrote:

    > You can make the userform larger, but it isn't a zoom type operation - the
    > controls on the form will not resize:
    >
    > Sub UserForm_Activate()
    > With Application
    > 'maximize Excel
    > .WindowState = xlMaximized
    > Me.Top = .Top
    > Me.Left = .Left
    > Me.Height = .Height
    > Me.Wdith = .Width
    > End With
    > End Sub
    >
    >
    > Sub FormFit()
    > UserForm1.Show
    > End Sub
    >
    >
    > The above assumes excel is maximized. (I added code to maximize it)
    >
    >
    > The activate event is in the Userform code module.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "eyesonly1965" wrote:
    >
    > >
    > > hello i have been searching and searching,
    > > but can't find anything about opening a form maximized.
    > >
    > > can anyone tell how to do this?
    > >
    > >
    > > --
    > > eyesonly1965
    > > ------------------------------------------------------------------------
    > > eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
    > > View this thread: http://www.excelforum.com/showthread...hreadid=539653
    > >
    > >


  4. #4
    Registered User
    Join Date
    05-07-2006
    Posts
    19

    Thumbs up thanx

    thanx this is excactly what i was looking for.
    it works just fine now.

+ 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