PDA

View Full Version : copy specific columns from one excel file to already opened excel file



sindhuja
01-05-2009, 12:09 PM
Hello?

Here is my requirement?

I just want to copy the highlighted columns in Book1.xls to another excel file named sample.xls which is already open.
Can this be done and if so please help me out.

-Sindhuja

lucas
01-05-2009, 12:52 PM
Have you tried recording a macro that does this? After you have an understanding of what it does we can help you clean it up.

sindhuja
01-07-2009, 07:10 PM
Yes Lucas...
I recorded a macro to do my task and it works fine....

How can this be done without opening the target file [sample.xls] i need to copy the contents from the source with only the source file [Book1.xls]opened.

i need to specify the target file name using coding.

-Sindhuja

lucas
01-07-2009, 10:43 PM
Put these in the same directory and run the book1.xls

alternatly you can specify a path using commented code in the module or you can browse using some of the commented code if you choose that method.