Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default When Saving As

Is there any way when a workbook is saved as that the new workbook doesn't
keep the code from the main workbook.

Thanks Mike

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default When Saving As

Hi Mike

Excel version ?

In 97-2003 if there is no code in the sheet module's you can use

Worksheets.Copy

This create a new workbook with all worksheets without the modules and the code in the thisworkbook module.
You can save this workbook then

Or use Chip's code
http://www.cpearson.com/excel/vbe.htm


Excel 2007

Save the workbook as xlsx (macro free workbook) and it will remove all code.


--

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


"Mike" wrote in message ...
Is there any way when a workbook is saved as that the new workbook doesn't
keep the code from the main workbook.

Thanks Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default When Saving As

http://www.cpearson.com/excel/vbe.htm

has sample code for deleting code.

--
Regards,
Tom Ogilvy

"Mike" wrote in message
...
Is there any way when a workbook is saved as that the new workbook doesn't
keep the code from the main workbook.

Thanks Mike



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
Automaticly saving formula's to values when saving Gunti Excel Discussion (Misc queries) 8 November 11th 08 09:34 AM
saving Arnie New Users to Excel 0 May 16th 08 12:24 PM
Saving a spreadsheet without saving the Macro tedd13 Excel Programming 7 March 31st 06 02:17 PM
saving with VBA Tom Ogilvy Excel Programming 1 August 24th 04 09:07 PM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM


All times are GMT +1. The time now is 09:54 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"