Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove VBA before doing .SaveAs
Hi,
I am using Excel 2007. I have created a file call Template.xlsm that I use as a template for generating a report. In the Workbook_Open() event form Template.xlsm, I call Application.Run "BatchReport". "BatchReport" is a Sub I created that has some code to pull data from a database and put it in the right places. After the data is returned, all links to the database are broken so that all data in the workbook is now static. Next, I call ActiveWorkbook.SaveAs to save this workbook to a new filename. This works great. My only problem is that in my newly created file, the Workbook_Open() event still calls sub "BatchReport" (which still exists). If possible, I would like to both (1) remove the call to sub "BatchReport" in Workbook_Open() and (2) remove sub "BatchReport" entirely. Any help or advice would be greatly appreciated. Thanks in advance, Paul -- Paul Kraemer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
saveas ActiveWorkbook.SaveAs Filename:=Range("A1").Value | Excel Programming | |||
How to Remove Macro from SaveAs file | Excel Programming | |||
remove convert/extract the number from'12345.56; ie remove ' sign | Excel Worksheet Functions | |||
How do I remove hyperlink if 'remove' option is disabled | New Users to Excel | |||
Is there a way to remove numbers w/o remove formulas | Excel Programming |