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. . |
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. . |
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. . |
All times are GMT +1. The time now is 03:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com