DatabaseDude
Programmer
I have a userform with a listbox containing all worksheets in the current workbook.
My goal is to allow users to select worksheets from the list, and for these selected sheets to be copied to a new workbook.
When recording a macro of this process, I find the following:
Of course, I'd simplify it as so:
Now ... how do I insert the selected worksheets from the listbox control into this code segment?
Thanks in advance,
Bryant
My goal is to allow users to select worksheets from the list, and for these selected sheets to be copied to a new workbook.
When recording a macro of this process, I find the following:
Code:
Sheets(Array("Sheet 1","Sheet 2","Sheet 3")).Select
Sheets(Array("Sheet 1","Sheet 2","Sheet 3")).Copy
Of course, I'd simplify it as so:
Code:
Sheets(Array("Sheet 1","Sheet 2","Sheet 3")).Copy
Now ... how do I insert the selected worksheets from the listbox control into this code segment?
Thanks in advance,
Bryant