LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Copy macro to a new book in 2007

I have a master file with a macro in it. When I click a button, the macro
will copy 3 sheets from the master file to a new book. I have macros in 2 of
the sheets that I copy. It works fine (meaning the macros are copied over to
the new book also) until the macro runs the saveas function:
ActiveWorkbook.SaveCopyAs "C:\New\" & NewName & ".xls"
The new file doesn't have any macro in it.
I tried saving the new file as .xlsm and .xlsx but Excel doesn't recognize
the file extensions when I open the new file.
What should I do to keep the macro in the new file?
Thanks in advance.
 
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
copy worksheets to new book without linking to original book Lori Excel Discussion (Misc queries) 2 March 4th 09 04:46 PM
copy 2007 created macro to run in 2003 amaries Excel Discussion (Misc queries) 4 December 18th 08 07:48 PM
Copy macro to a new book in 2007 Ron de Bruin Excel Programming 0 October 1st 07 06:32 PM
macro: copy multiple workbooks to multiple tabs in single book Michael Excel Programming 0 July 14th 06 04:53 PM
macro to copy specific rows to a new book Karen W Excel Programming 1 February 24th 05 06:46 PM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"