Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]XL Master[/b]

Status
Not open for further replies.

trystanhuwwilliams1

Programmer
Jan 7, 2003
44
0
0
GB
Hi hope someone can help me out here...

I have a XL workbook which acts as a master for creating monthly reports. A sheet from a different spreadsheet is imported and manipulated to produce the monthly report.

After producing the report I then manually move the report sheet into a new book and then save the workbook in a separate folder.

I want to automate this process, but everytime the macro switches the focus onto the new-book the procedure stops dead.

Can anyone tell me how I can automatcially move a sheet from one workbook to a new workbook, then save it in its own folder???


Thanks,

T
 
Hi,

You might post your code and annotate where it craters

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
The quickest and easiest depending upon your expertise, is to run your macro and then stop. Then select 'tools'/ 'macro'/'record new macro'
assign it a shortcut key and then continue the procedure as you wish. After completing the additional tasks select 'tools'/'macro'/'stop recording'.
Then you can go to 'tools'/'macro'/'macros' select the last one in the list and select edit. Copy the macro without the 'sub' and 'endsub' or any in green font.
Close the macro and go back to editing and select the macro you wish to alter. Paste the new addition to the existing macro right before the 'end sub' command. Then close and run to check.
If you are unsure of what you are doing you can do it in reverse and copy the existing one in front of the one you recorded this allows you to not disrupt the working one.
Then use the shortcut you assigned to test it.

Jim
 
Backing Skip's request here but you may also want to have a squiz at this FAQ:
faq707-2482

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top