Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Work-around for exporting sheet contents and removing code

Hi Arnold

Install my mail add-in, you have a option to delete the VBA in there
http://www.rondebruin.nl/mail/add-in.htm

don't want to have to manually reference VBA Extensibility and set
the trust access to visual basic project on different computers.


No other way, my code check this setting


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?


My code examples use the date/time in the file name



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Arnold" wrote in message oups.com...
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Work-around for exporting sheet contents and removing code

Thanks Ron

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Work-around for exporting sheet contents and removing code

Now I have a question about the file sizes--my workbook is about 2.7
megs, and when I export 2 sheets using the add-in or sample code, the
exported file remains about 2 megs. When the contents of the sheets
are selected manually, the size is considerably less. There is not
much difference between the amount of data in the manual selection vs.
the entire 2 sheets--just formatting. I've removed formatting in both
codes... Any ideas?

Thanks

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
VBA code to copy cell contents from one sheet to another Gimp Excel Worksheet Functions 0 February 23rd 07 05:18 PM
Trouble removing toolbar - why won't my code work? [email protected] Excel Programming 1 November 28th 06 10:01 AM
Code to work with ONLY active Sheet not all ? Corey Excel Programming 2 October 9th 06 02:52 AM
Exporting work sheet info to envelopes chazcps Excel Discussion (Misc queries) 2 June 27th 06 07:17 PM
Worksheet_Selection Change code will not allow cell contents to be copied and pasted onto the sheet it's running on KimberlyC Excel Programming 1 July 8th 05 02:51 AM


All times are GMT +1. The time now is 02:09 AM.

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

About Us

"It's about Microsoft Excel"