ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying a sheet to new work sheet (https://www.excelbanter.com/excel-programming/283457-copying-sheet-new-work-sheet.html)

Andy Kwok

Copying a sheet to new work sheet
 
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

Don Guillett[_4_]

Copying a sheet to new work sheet
 
See my post in "breakup spreadsheets"

--
Don Guillett
SalesAid Software

"Andy Kwok" wrote in message
om...
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




Tom Ogilvy

Copying a sheet to new work sheet
 
set sh = activeworksheet
' add a single sheet workbook
workbooks.Add xlWBATWorksheet
sh.cells.Copy ActiveSheet.Cells(1,1)
activeWorkbook.Sendmail ", _
Subject:=sh.name
activeworkbook.close SaveChanges:=false

--
Regards,
Tom Ogilvy

"Andy Kwok" wrote in message
om...
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





All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com