View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
A Billmeier A Billmeier is offline
external usenet poster
 
Posts: 1
Default Saving file without macros

I am trying to work through a similar situation. I have a workbook that generates a copy of itself. I would like the copy to be as streamlined as possible, so I would like to delete the excess sheets and code

All code in the workbook is within Module1. Module1 is triggered by a Command Button
Would like Module1 to do the following..
1.)All it processin
2.)Delete unneeded sheet
3.)Save the new workboo
4.) delete itself and save again

Everything works except item 4. I currently have the delete routine as the second to last thing in Module1. It is bombing out


----- Ron de Bruin wrote: ----

Hi Pau

You can run a macro that delete the whole module wher
you store the macro's
The macro you run is also in this modul

Sub deletemodule(
With ThisWorkbook.VBProject.VBComponent
.Remove .Item("Module1"
End Wit
End Su





--
Regards Ron de Brui
(Win XP Pro SP-1 XL2000-2003
www.rondebruin.n



"Paul_Russell " wrote in message ..
I run a report every morning and have written some code to save th
report with today's date
However every file that has been saved contains all the macros tha
were in the template
Is there an easy way to save files without saving the macros
Cheer

Pau
--

Message posted from http://www.ExcelForum.com