Copying shts from one wbk to another

J

jacqui

What would be the equivalent in VBA code to the Right
click on the worksheet tab where you can then Copy the
sheet or sheets to another workbook (which in this case
would be a new one).

Can anyone help?

Many thanks
Jacqui
 
R

Rob Bovey

Hi Jacqui,

This macro will copy the first worksheet in the workbook where it runs
into a new workbook:

Sub CopySheet()
ThisWorkbook.Worksheets(1).Copy
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 

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