excel - Selectable ComboBox in VBA returning sheet names to move/hide -
first of all, great in knowledge , help. i've got question comboboxes know nil them.
here scenario: have book 93 tabs, titled agent name. need manually filter out agents no longer here , re-create contents of agent's sheet sheet.
the problem i'm having how create combo box of these sheet names can select multiple entries? , how loop go through list of tabs list need move and/or hide.
thanks bunch confused vba noob....
jeff
why create combo box?
we may have create sheet hold names, can done 2 macros. 1 create list of sheets
sub listsheets() dim sh dim pos long pos = 1 ' 1st line each sh in activeworkbook.sheets activesheet.range("a" & pos) = sh.name pos = pos + 1 next end sub
then can delete ones don't want re-create leave list of sheets need copied.
with that, can re-create these remaining sheets new workbook
sub copysheets() dim sh dim pos long pos = activesheet.range("a1").end(xldown).row while pos > 0 'remember alter "book1" name of whatever ' spreadsheet have open re-create info into. sheets(range("a" & pos)).copy after: workbooks("book1").sheets (1) pos = pos - 1 wend end sub
both of these macros can attached buttons, , utilize of inputbox
can prompt name of spreadsheet re-create in to.
excel vba excel-vba combobox
No comments:
Post a Comment