Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

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
Saving Macros MAtt Excel Discussion (Misc queries) 2 June 4th 08 06:07 PM
Saving Macros Matt Excel Discussion (Misc queries) 0 June 4th 08 05:46 PM
Macros making file saving extremely slow. Donald Speirs Excel Discussion (Misc queries) 1 January 20th 05 10:10 PM
Saving Macros brodine Excel Worksheet Functions 1 November 9th 04 04:14 PM
Saving Macros Peter[_35_] Excel Programming 1 January 26th 04 09:27 PM


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