Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Copy a complete modulesheet from file to another file

Hello,

I see some difficult examples for copying a complete modulesheet from file to file. Perhaps somebody knows the best/easiest way.

I have a MASTER.xlsm (macro enabled) file. This file contains a modulesheet called BasicToCopy. This is the modulesheet I want to copy to another created file. Included is also another modulesheet which should contain the macro which can copy the sheet 'BasicToCopy' to the other file.

When I create a new xls file I want to copy the modulesheet 'BasicToCopy' from file MASTER.xlsm to this new created file (and then a have to save this file also as a xlsm file, but that is a manualy action because I have to think a file name).

So.... I have 2 open files. 1= My new created file, 2= MASTER.xlsm with 2 modulesheets (the one with the copy commandos, one with the to copy module).

When running the macro, then my new file is the active file;
1. Set ActiveFileName in memory.
2. GoTo MASTER.xlsm and copy module sheet 'BasicToCopy'
3. Back to the active file from step 1.
4. Insert/Paste the complete module 'BasicToCopy' in the file from step 1.

Thats all :)

But know in a working code.
So if somebody things... yes, this is a nice one to create. Feel free (and make me happy).

regards, Johan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Copy a complete modulesheet from file to another file

You can drag-n-drop modules from one file to another in the VBE!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Copy a complete modulesheet from file to another file

You can drag-n-drop modules from one file to another in the VBE!

Also, if you save all the code in a template file you can start new files based
on that template; - they'll have everything in place from the get-go!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Copy a complete modulesheet from file to another file

You can drag-n-drop modules from one file to another in the VBE!

IOW:
Save your Master.xlsm as Master.xltm and use it as the template to create new
workbooks from...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
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
Hyperlink not showing complete file path Safi. Excel Programming 3 April 6th 07 03:36 PM
how to save the complete path of the file we open? Gary Keramidas Excel Programming 3 January 4th 07 10:28 AM
how to save the complete path of the file we open? NickHK Excel Programming 1 January 4th 07 07:07 AM
Export Excel File as a Complete Entity pianoman[_29_] Excel Programming 2 May 26th 06 12:44 PM
Update complete excel file online Philipp Andre Excel Discussion (Misc queries) 0 November 3rd 05 01:56 PM


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