View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
MandrakeDM MandrakeDM is offline
external usenet poster
 
Posts: 3
Default Changing a macro from a specific worksheet to any worksheet

Thanks Jay. I won't be able to try it until Sunday night but it looks good.
Between you and Gary's Student, I think it's solved.

Mandrake

"Jay" wrote:

Hi MandrakeDM -

Sub mandrake()
Worksheets("HeaderSheet").Range("A1:J1").Copy
ActiveSheet.Paste Destination:=Range("B12")
End Sub
------

I also suggest adding the following optional statement just prior to the End
Sub to turn off the flashing copy marquee on the copied header source range:

Application.CutCopyMode = False
End Sub

--
Jay


"MandrakeDM" wrote:

Hi,

I'm creating a series of macros that will access a sheet, copy a header line
and then return to the original worksheet and paste the give header where I
want it to go. I don't have any real problem creating the macro itself.
Where my problem is, is that right now, it's only good for one sheet. The
way the macro reads, it copies the headers and then comes back to the
worksheet that I was on when I originally created the macro. So then, how do
I change the macro from returning to the original sheet and return to the
sheet that I am currently on? Any help would be appreciated.