ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs Copying Macro to New File (https://www.excelbanter.com/excel-programming/412305-saveas-copying-macro-new-file.html)

Rebecca_SUNY

SaveAs Copying Macro to New File
 
I am using the ActiveWorkbook.SaveAs command to save a file from a template
to an individual Excel file for each of 31 items. The code selects the
worksheet and copies it to a new workbook, then saves the new workbook with a
set name.

The code is all working correctly but when I try to open the file I am
getting the Disable/Enable macro question. I don't want the end user to see
this message (or the macro) and there is no reason for the macro to save to
the individual file but I can't get it to stop.


Jim Cone[_2_]

SaveAs Copying Macro to New File
 

Move the code from the sheet module to a standard module.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Rebecca_SUNY"
wrote in message
I am using the ActiveWorkbook.SaveAs command to save a file from a template
to an individual Excel file for each of 31 items. The code selects the
worksheet and copies it to a new workbook, then saves the new workbook with a
set name.

The code is all working correctly but when I try to open the file I am
getting the Disable/Enable macro question. I don't want the end user to see
this message (or the macro) and there is no reason for the macro to save to
the individual file but I can't get it to stop.



All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com