Copying a sheet to new work sheet

A

Andy Kwok

Hi,

I have a workbook with macros copying data from one sheet into
another.
This works fine. However, I want to e-mail the sheet that is created
but not the entire workbook as its 5 megs.

I have tried to copy/move the sheet into a new workbook but it also
copies
the macros. When I remove the module the file still remains at 5 megs.
I would appreciate any help.

Thanks

Andy
 
T

Tom Ogilvy

set sh = activeworksheet
' add a single sheet workbook
workbooks.Add xlWBATWorksheet
sh.cells.Copy ActiveSheet.Cells(1,1)
activeWorkbook.Sendmail recipient:="(e-mail address removed)", _
Subject:=sh.name
activeworkbook.close SaveChanges:=false
 

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