View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arnold[_3_] Arnold[_3_] is offline
external usenet poster
 
Posts: 76
Default Work-around for exporting sheet contents and removing code

Hi Everybody,
I'm trying to copy some contents of two sheets into a new workbook to
be saved on the user's desktop and attached to an email. Ron's
send mail codes (http://www.rondebruin.nl/sendmail.htm) work great, but
I must get rid of all code behind the sheets in the new wbook. I have
also used Chip's code at http://www.cpearson.com/excel/vbe.htm, but I
don't want to have to manually reference VBA Extensibility and set
the trust access to visual basic project on different computers.

Is there a way around this in Excel XP through code?

OrI've created a macro to simply copy the content from the active
wbook, create a new wbook, paste and format as needed, etc.-but
cannot figure out how to name the new wbook and save it to the user's
desktop.

How is it possible to create a unique name for the wbook (if Book1 or
Book2 or TodaysDate.xls is already present) and make this efficient?

Thanks,
Eric