Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
saving excel file
You can have the code create a copy that does not contain
the sheet you don't want to send, then send the copy. Something like: Sheets(Array ("SheetName1", "SheetName2", "SheetName3", "SheetName4")).C opy Set NewBook = ActiveWorkbook NewBook.SaveAs Filename:="C:\NewBookName.xls" -----Original Message----- I am working on a project that requires me to save the xl file and then email it. The problem is that I do not want to save and send the whole file. I just want to save and email the 1st 4 sheets and not the form that I am using for the code. Is this possible? Cannot seem to find any way to do it. Thanks in advance for your great help. . |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
saving excel file
I tried using this method but it keeps giving me an out of range error right where I declare the sheets array. Does this work in a macro? I am using the code in a procedure on a form.
"Tod" wrote: You can have the code create a copy that does not contain the sheet you don't want to send, then send the copy. Something like: Sheets(Array ("SheetName1", "SheetName2", "SheetName3", "SheetName4")).C opy Set NewBook = ActiveWorkbook NewBook.SaveAs Filename:="C:\NewBookName.xls" -----Original Message----- I am working on a project that requires me to save the xl file and then email it. The problem is that I do not want to save and send the whole file. I just want to save and email the 1st 4 sheets and not the form that I am using for the code. Is this possible? Cannot seem to find any way to do it. Thanks in advance for your great help. . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
saving excel file
Thanks, that did work, it would of helped if I activated to sheet first. Thanks for the help. Always appreciated.
"Tod" wrote: You can have the code create a copy that does not contain the sheet you don't want to send, then send the copy. Something like: Sheets(Array ("SheetName1", "SheetName2", "SheetName3", "SheetName4")).C opy Set NewBook = ActiveWorkbook NewBook.SaveAs Filename:="C:\NewBookName.xls" -----Original Message----- I am working on a project that requires me to save the xl file and then email it. The problem is that I do not want to save and send the whole file. I just want to save and email the 1st 4 sheets and not the form that I am using for the code. Is this possible? Cannot seem to find any way to do it. Thanks in advance for your great help. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2007 file in 2003 creates very large file | Excel Discussion (Misc queries) | |||
Excel should let me sort the file directory when saving a file | Excel Discussion (Misc queries) | |||
Saving an excel file without it amending the name of file name | Excel Discussion (Misc queries) | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) | |||
Programatically saving an excel .csv file to .xls file... | Excel Programming |