paste to different xls files

mrpink

New Member
Joined
Sep 26, 2002
Messages
7
Hi y'all,

First off, I am a XL - VBA noob, meaning I have little experience. The only macro I ever wrote was to convert digits (or numbers) in full english, french or dutch text. (if anybody wants it, PM me) My employer (I am a college student doing a late "summer"-job) has asked me if it is possible to paste a selection to multiple distinct xls-files. These files do not have the same heading, which according to me can cause some difficulties...
Is this possible, and if so, can anybody help me? Does anybody know a site where I could download such a free macro?

thanks, your help is much appreciated

MrPink
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
This code will paste the current selection to a new workbook:

Code:
Sub Test()
    Selection.Copy
    Workbooks.Add
    ActiveSheet.Paste
End Sub

What are the names of the workbooks you want to copy the data to? And in which folder are they?
 

Forum statistics

Threads
1,144,330
Messages
5,723,746
Members
422,513
Latest member
Meathead2022

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top