Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    center userform in vba (2000)

    How to be sure based resolution screen of user to center userform in screen?
    Via code or in property of userform...
    Tks.

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: center userform in vba (2000)

    I thought the default position was the centre of the screen?

    If you need to set it, I think the Startup postion property sets it - see this.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: center userform in vba (2000)

    Good!
    And is possible to NO permit to the user to move the userform?
    In effect i want to Locked the userform in center position...

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: center userform in vba (2000)

    You can hide the title bar of the form, so that the user can't drag it around.
    The attached sample workbook shows how to do it, based on the code in Colo's Excel Junk Room -vba tips.
    Attached Files Attached Files

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: center userform in vba (2000)

    ... tks.
    But is this only the method?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: center userform in vba (2000)

    Yes, as far as I know.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: center userform in vba (2000)

    Tks i use the your suggestion...

  8. #8
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: center userform in vba (2000)

    As far as I know, yes. Is there something wrong with it?
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •