+ Reply to Thread
Results 1 to 8 of 8

How to adjust size of the userform ?

  1. #1
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question How to adjust size of the userform ?

    Hi , I am new to Excel VBA

    Problem - Normally, If u move your cursors to the corner of your userform,we will see the single-two pointed arrow pop-out and then we can adjust our own desired size of the user-form.

    How to do that in EXCEL VBA? your help is appreciated!!
    Last edited by joh46k; 04-04-2013 at 10:08 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to adjust size of the userform ?

    Me.width = 150
    Me.height = 200
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Arrow Re: How to adjust size of the userform ?

    @AndyLitch: where to put those code in #2
    Is it under UserForm Initialize ?
    Last edited by joh46k; 04-04-2013 at 10:24 PM.

  4. #4
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: How to adjust size of the userform ?

    @AndyLitch:

    I tried to put your code inside the UserForm Initialize but no arrows appear at the corner to adjust !

    (If i am not wrong, code in #2 , is fixed size and user cannot adjust their desired size )

    Last edited by joh46k; 04-04-2013 at 10:30 PM.

  5. #5
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: How to adjust size of the userform ?

    Bump no response

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to adjust size of the userform ?

    Apologies - server problems

    It sets the size of the userform for you so you won't get handles.. I would generally put the code in the initialize section but it can go anywhere that suits best.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,444

    Re: How to adjust size of the userform ?

    Here is a non API approach.
    http://www.andypope.info/vba/resizeform.htm

    You might also want to look at the anchor controls example if you are allowing userform resizing.
    http://www.andypope.info/vba/Anchor.htm
    Cheers
    Andy
    www.andypope.info

  8. #8
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to adjust size of the userform ?

    Very impressive Andy... I must make a point of learning that

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to adjust size of the userform ?

    see also formfun.zip on Stephen Bullen's page http://www.oaltd.co.uk/Excel/
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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