View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rajat[_3_] Rajat[_3_] is offline
external usenet poster
 
Posts: 1
Default Put copy/paste between books in macro


Hi,

I have a s/s that is the output of a query called
target.xls.

I have another s/s (template.xls) that is a template for
how target.xls should look in terms of formatting.

I want to write a macro that will make target.xls keep its
data but take its formatting from target.xls.

When recording a macro, I flip between both s/s, copying
some columns etc from template.xls and pasting them into
target.xls. However, the macro won't record such
movements properly.

I also tried doing all the copy/pastes and then undoing
till the beginning, then starting to record and then
redoing till the end. This didn't work either.

Is there any way to capture the copy/pastes in the macro
OR
do I need to recreate the formatting in template.xls
manually?

Thanks!

Regards,
Rajat