Consulting

Results 1 to 7 of 7

Thread: combo boxes pile up when hiding rows

  1. #1

    combo boxes pile up when hiding rows

    I have a worksheet with two data sets (about 36 rows each), one below the other, each representing a different fundamental strategy of product development. Each data set has 4 combo boxes that control scenarios in four different business variables.

    For a variety of reasons, the least complicated way to control which data set is used for further calculation is to hide the data set that does not apply through a toggle mechanism. This works fine except that all four combo boxes from the hidden range pile up on top of one another, like Lego blocks, and act as a distraction.

    Is there any way to make the combo boxes also disappear temporarily or is this the nature of the beast?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You could just change the Visible proiperty of the combobox when the associated rows get hidden and vice versa.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    How is that done? I am not even sure how these combo boxes are addressed in the VBE. In Excel's Name Box they are defined as Drop Down 1, 2...all the way to 109, but I doubt that syntax would work in VBE. I should clarify that these combo boxes were created from the Forms toolbar and not from the Control Toolbox.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Then it is just

    [vba]

    Activesheet.Dropdowns("Drop Down 1").Visible = False
    [/vba]


    and so on
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Can I replace "Activesheet" with "Worksheets("Sheet name")?

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Yep.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    In addition to hiding the comboboxes, you might also want to set the properties of the combo boxes to "Don't move or size with cells"

Posting Permissions

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