Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

VBA - "Close"/UN_DropDown a combobox list?

$
0
0

I'm working on a dynamically filled Excel combobox, but sometimes when I update the list inside, the display gets crazy.

As I fill and check the list, I use these :

  1. to adjust the number of visible lines

    If .ListCount > 14 Then
        .ListRows = 15
    Else
        .ListRows = .ListCount + 1
    End If
    
  2. to display/unwrap the list (anyCB is an Object parameter in my Sub)

    anyCB.DropDown
    Set Cbo = corresWS.OLEObjects(anyCB.Name)
    Cbo.Verb xlVerbPrimary
    

But sometimes, there is still 15 visible lines but a litlle slider inside the big (15) one, to scroll through all the lines in a single one... :/

So I'm wondering if there is any way to close/unwrap/retract the list before changing the number of visible lines. On any other workaround that you could suggest ;)


Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>