Combo Boxes

  • I want to create a form and use VBA to make a combo box list all the sheets in a book. Is it possible to select multiple entries like in HTML? I would like the user to be able to select the sheets they do not want to delete before a macro runs. Thanks

  • Re: Combo Boxes

    hi Z,

    first of all i don't think you can multiselect a combobox,
    you can achieve that with a listbox

    in VBE, place a listbox on a userform and set it in the Properties > Multiselect >

    double click the userform and place this module:

    Private Sub UserForm_Initialize()
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
        With Me.ListBox1
            .AddItem ws.Name
        End With
    End Sub

    hope this helps

    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and[/st]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!