+ Reply to Thread
Results 1 to 7 of 7

Active X List box cnhanges size each time I open the workbook?

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Active X List box cnhanges size each time I open the workbook?

    I have an Active X list box that displays the 12 months of the year. Each time I open the workbook, the size shrinks so only two or three months are displayed. Is there a way to lock the size? I have set the [Locked] option under Properties to True.

    Thanks in advance

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

    Re: Active X List box cnhanges size each time I open the workbook?

    Put this code in the worksheet module of your listbox

    Please Login or Register  to view this content.
    Elegant Simplicity............. Not Always

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Active X List box cnhanges size each time I open the workbook?

    Hello Aland2929,

    An ActiveX ListBox Control has a IntegralHeight Property, which by default is set to True. Go into the Properties Window of the ListBox and set that to False. This should stop the Auto Re-sizing.

    If that does not work, then I suggest you consider what AndyLitch posted.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Active X List box cnhanges size each time I open the workbook?

    Both options work, so thank you both very much for your time and effort.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Active X List box cnhanges size each time I open the workbook?

    Hello Aland2929,

    You are welcome.

    Thank you for the Rep!

    Happy Coding.

    Cheers.
    Last edited by Winon; 04-24-2013 at 06:42 AM. Reason: Spelling mistake foutjie!

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

    Re: Active X List box cnhanges size each time I open the workbook?

    Oh and Winon - thanks for the IntegralHeight Property tip

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Active X List box cnhanges size each time I open the workbook?

    @ AndyLitch

    Hello AndyLitch,

    Like you quote: "Elegant Simplicity............. Not Always" , but hey, you are welcome.

+ 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