+ Reply to Thread
Results 1 to 2 of 2

Excel ListBox strange behaviour

  1. #1
    Registered User
    Join Date
    01-29-2006
    Posts
    4

    Excel ListBox strange behaviour

    I have a ListBox on a form in an Excel workbook.

    Whenever I change the RowSource property the height of the ListBox also changes (albeit by a small amount).
    I'm not even convinced that changing the RowSource is the problem as it also happend (sometimes) when I change the ColumnHeads or ColumnWidths properties)

    My question is why does this happen and how can I stop it?


    Thanks in advance


    Sean
    Sean

    "If at first you don't succeed, go to sleep"

  2. #2
    Registered User
    Join Date
    01-29-2006
    Posts
    4

    and the answer is ...

    the .IntegralHeight property of the listbox.

    IntegralHeight = TRUE
    When set to TRUE, this property will resize the listboxto only display complete rows of data, which seems like a good idea except that it was often cutting off access to the last row. I think this was happening because the .Zoom property of my form was set to 120% (it seems to work OK when .Zoom is set to 100%)

    I used this property in two different ways :-
    1. Setting .IntegralHeight first to TRUE then FALSE works fine except it resets the selected data on the listbox.
    2. First set the .Height property to your fixed value then set .IntegralHeight to FALSE

    IntegralHeight = FALSE
    When set to FALSE is does not even try to adjust the height of the listbox


    All in all it seems a bit fiddly, but ultimately solves the problem.

+ 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