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
Combo Boxes
-
-
-
Re: Combo Boxes
hi Z,
first of all i don't think you can multiselect a combobox,
you can achieve that with a listboxin VBE, place a listbox on a userform and set it in the Properties > Multiselect >
1-MulltiSelectMultidouble click the userform and place this module:
CodePrivate Sub UserForm_Initialize() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With Me.ListBox1 .AddItem ws.Name End With Next End Sub
hope this helps
-
Re: Combo Boxes
Hmm, I guess I missed the list box before. That does exactly what I want, though. Thanks a lot!
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!