Insert copied area help

M

MikeM

Hi all,

Looking for a way to insert an area copied from one worksheet into
another worksheet - using a macro.

We use Excel for payroll, and at the beginning of every pay period, I
need to copy a blank payroll sheet and insert it into each of 12
employee worksheets.

I can record a macro that will begin at an employees sheet, insert
blank lines, go to the "MASTER" sheet, copy the blank payroll sheet,
return to the "active" employees sheet and paste in the new blank
payroll area. However, when I do that (as you probably have already
guessed) all it EVER does is past a blank sheet into that same
employees sheet, no matter which employee I am trying to work with.

How do I get it to paste the area into the sheet I am currently active
in?

TIA

Mike
 
B

bigwheel

Does your recorded macro look something like this (only on a larger scale,
perhaps):-

Range("A4:A7").Select
Application.CutCopyMode = False
Selection.EntireRow.Insert
Sheets("Master").Select
Range("A1:A4").Select
Selection.Copy
Sheets("SMITHB").Select
Range("A4").Select
ActiveSheet.Paste

If so, it's relatively simple to put the code into a loop which will perform
the same insert and copy on each sheet in the workbook.
Let me know what you've got so far, and I can show you how to code it.
 
D

Don Guillett

You can't insert a sheet into another sheet. You can copy rows or ranges,
etc and insert but not a sheet. Post your code for comments and
improvements.
 

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

Top