ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to copy to another workbook (https://www.excelbanter.com/excel-programming/402263-macro-copy-another-workbook.html)

tom

macro to copy to another workbook
 
Hi,

Any help with creating a macro to do this would be greatly appreciated. Not
a VB guru.
The open workbook is called 15.xls. What I'm trying to do is copy this
workbook to a destination workbook called "template.xls" and have that
entire workbook 15.xls to appear on the template on the sheet called
"Inventory3.xls" Down the road it would be used again and again. Thats why
would rather not just do copy/past . Any help on how u write a quick macro
for this would be
greatly appreciated.

Thanks,

Tom


tom

macro to copy to another workbook
 


"Tom" wrote:

Hi,

Any help with creating a macro to do this would be greatly appreciated. Not
a VB guru.
The open workbook is called 15.xls. What I'm trying to do is copy this
workbook to a destination workbook called "template.xls" and have that
entire workbook 15.xls to appear on the template on the sheet called
"Inventory3.xls" Down the road it would be used again and again. Thats why
would rather not just do copy/past . Any help on how u write a quick macro
for this would be
greatly appreciated.

Thanks,

Tom


tom

macro to copy to another workbook
 
I also forgot to add, that within the workbook called "template.xls" the
info from the workbook "15.xls, would want all the info copied to a sheet
called "inventory3" that is in the "template.xls" forgot to add that part
in my first post.

Thanks again

"Tom" wrote:

Hi,

Any help with creating a macro to do this would be greatly appreciated. Not
a VB guru.
The open workbook is called 15.xls. What I'm trying to do is copy this
workbook to a destination workbook called "template.xls" and have that
entire workbook 15.xls to appear on the template on the sheet called
"Inventory3.xls" Down the road it would be used again and again. Thats why
would rather not just do copy/past . Any help on how u write a quick macro
for this would be
greatly appreciated.

Thanks,

Tom


Bill Renaud

macro to copy to another workbook
 
Why not simply rename the worksheet that has all of the data to
"inventory3", then save the workbook as "template.xls"? I don't think you
need a macro.

It sounds like you are doing something more complex than this. If so, then
post additional details.

--
Regards,
Bill Renaud




tom

macro to copy to another workbook
 
Hi Bill,

Yes, you are correct down the road it will be something more complex..
Dealing with about 50 workbooks being pulled into workbook called
"template.xls with it going to "sheet 2" but as of right now what were
trying to do is just get the one file called 15.xls going into "sheet 2"..
there are a bunch of differents sheets going into template.xls files and
where just trying to get this one thing done first.. any help would be
greatly apprecaited..

"Bill Renaud" wrote:

Why not simply rename the worksheet that has all of the data to
"inventory3", then save the workbook as "template.xls"? I don't think you
need a macro.

It sounds like you are doing something more complex than this. If so, then
post additional details.

--
Regards,
Bill Renaud





Bill Renaud

macro to copy to another workbook
 
You still need to post more details. You first mentioned that "15.XLS" was
going to be copied to a worksheet named "inventory3" in "template.XLS",
now, it is going to be copied to "Sheet2". Your requirements are shifting,
which means a program cannot yet be written.

Does "15.XLS" have more than 1 worksheet?
Do the worksheets go to different worksheets in the template?

Etc, etc.

It is not very complex if each workbook to be imported has only 1
worksheet, and all data (except for row 1, which is assumed to be headers)
is simply copied to the template (or master) workbook. If each workbook to
be imported has different column labels at the top, then it could get more
complex.
--
Regards,
Bill Renaud




Bill Renaud

macro to copy to another workbook
 
I ran the following search term ("with all of the words") on the web and
came up with a lot of results that you might be interested in:

combine Excel workbooks into single workbook

--
Regards,
Bill Renaud




tom

macro to copy to another workbook
 
Hi Bill,

I guess I might have confused you in my other posts. Okay in the workbook
called 15.xls has no sheets in it. The workbook called Template.xls
sheet2 is called Inventory3. Sorry my apologies for that mistake.. So
what we want is the workbook called 15.xls to be automatically copied to the
workbook called Template.xls on sheet 2.. lol I hope this clears up any of
my confusion for ya.

Thanks for your help in this matter

"Bill Renaud" wrote:

I ran the following search term ("with all of the words") on the web and
came up with a lot of results that you might be interested in:

combine Excel workbooks into single workbook

--
Regards,
Bill Renaud





Bill Renaud

macro to copy to another workbook
 
<<Okay in the workbook called 15.xls has no sheets in it.
OK, if workbook 15.XLS has no worksheets, then there is no data to copy!!!
Problem solved, as far as I am concerned!!!

--
Regards,
Bill Renaud




Bill Renaud

macro to copy to another workbook
 
See the "Copy/Paste/Merge examples" section on Ron de Bruin's web site
(http://www.rondebruin.nl/tips.htm) for lots of code samples that should
come pretty close to exactly what you need to do.

--
Regards,
Bill Renaud





All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com