SaveAs Copying Macro to New File

R

Rebecca_SUNY

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.
 
J

Jim Cone

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SaveAs? 4
xltm saveas xlsm 6
Confirm SaveAs takes place. 6
SaveAs 2
xlsm SaveAs xls 4
File SaveAs 1
Assign macro 2
SaveAs macro: How do I specify "Replace existing file?" 1

Top