saving excel file

T

Tod

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.
 
G

Guest

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.
 
G

Guest

Thanks, that did work, it would of helped if I activated to sheet first. Thanks for the help. Always appreciated.
 

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