#1
|
|||
|
|||
Range COPY paste in workbooks sheets as variable
Hi
i am not an vba expert and i am struggling with a copy of a range between workbooks. Made a macro which does a sheet count (for getting the sheetsnames equal i both workbooks etc placed hardcoded in Irow 12 for a loop. I want to copy a certain range (A1:M40) for all the same worksheets from workbook1 into workbook2, should be very easy.. Tried it with copy and destination etc.. i am getting a debugger at the .PasteSpecial Paste:=xlPasteValues A Run-time error "1004" That command cannot be used on multiple selection So far; Code:
Last edited by Fean; 06-07-2016 at 06:48 AM. |
#2
|
||||
|
||||
A run-time error, I guess you mean. And the error is...?
(Always include that, if you get one. Well, almost always.) |
#3
|
|||
|
|||
Quote:
A Run-time error "1004" That command cannot be used on multiple selections (*will put this in the orginal post..) I have been trying multiple ways.. now it bugs on the "pasteSpecial" |
#4
|
|||
|
|||
Solved! forgot to use With sheet... end sheet. The paste special should be treated by this!!
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Name a Range in a Word Document and then copy that range to the end of the doc w button click | DanNatCorning | Word VBA | 1 | 04-29-2016 10:47 PM |
Pull the data from different closed workbooks paste into master vba | manilara | Excel Programming | 2 | 11-19-2015 08:41 PM |
VBA macro to copy range and paste in next blank row | tune2grow | Excel Programming | 0 | 09-03-2014 08:25 PM |
Combining 2 workbooks into 1 workbook with TWO sheets | dguenther | Excel | 1 | 10-06-2011 03:25 AM |
Loop through folder of workbooks and copy range to other workbook | Snvlsfoal | Excel Programming | 3 | 07-29-2011 05:55 AM |