Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
Excel should let me sort the file directory when saving a file Beanee70 Excel Discussion (Misc queries) 0 March 14th 06 07:03 AM
Saving an excel file without it amending the name of file name Jenny Excel Discussion (Misc queries) 0 January 19th 06 09:03 AM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
Programatically saving an excel .csv file to .xls file... Pai Excel Programming 1 December 2nd 03 05:18 AM


All times are GMT +1. The time now is 05:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"