Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving file without macros
I run a report every morning and have written some code to save the
report with today's date. However every file that has been saved contains all the macros that were in the template. Is there an easy way to save files without saving the macros? Cheers Paul --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving file without macros
Hi Paul
You can run a macro that delete the whole module where you store the macro's. The macro you run is also in this module Sub deletemodule() With ThisWorkbook.VBProject.VBComponents .Remove .Item("Module1") End With End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Paul_Russell " wrote in message ... I run a report every morning and have written some code to save the report with today's date. However every file that has been saved contains all the macros that were in the template. Is there an easy way to save files without saving the macros? Cheers Paul --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving file without macros
Cheers for your help Ron
I'll give it a go in the morning Thanks Paul --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Macros | Excel Discussion (Misc queries) | |||
Saving Macros | Excel Discussion (Misc queries) | |||
Macros making file saving extremely slow. | Excel Discussion (Misc queries) | |||
Saving Macros | Excel Worksheet Functions | |||
Saving Macros | Excel Programming |