Copying multiple sheets into a NEW workbook

K

kev_06

Thanks for the help, but I still have a question. I've used the
following lines of code to take selected values from a list box and
copy the sheets. The code shown does this EXCEPT I need the multiple
sheets copied into a new, seperate workbook. If I take out the
after:=Worksheets(Worksheets.Count) line, I can only get 1 sheet copied
into a new workbook. Is there any way to copy all the sheets (could be
as many as 60) to the new workbook?

Dim Ndx As Long
With Me.ListBox1
For Ndx = 0 To .ListCount - 1
If .Selected(Ndx) = True Then
Worksheets(.List(Ndx)).Copy
after:=Worksheets(Worksheets.Count)
End If
Next Ndx
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top