Copy Range to new workbook

M

mmasters

I am wondering how I would copy a specified range to a new workbook
using VBA.

1. Make the selection in the in and place the contents in the
first workbook -- WB1 -- onto the clipboard.

2. Create / add a new workbook -- call this WB2.

3. Past the contents of the clipboard to WB2

If anyone has some code that I can look at it would be greatly
appreciated as I can make this work with a new worksheet but and
messing it up with the new workbook.

Thanks for the help.
 
R

Robin Hammond

Sub CopyRangeToNewBook()
Sheets("Sheet1").Range("a1:b2").Copy
Workbooks.Add
ActiveSheet.Paste
End Sub
 

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