Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2016, 08:59 AM
Fean Fean is offline Range COPY paste in workbooks sheets as variable Windows 7 32bit Range COPY paste in workbooks sheets as variable Office 2010 32bit
Novice
Range COPY paste in workbooks sheets as variable
 
Join Date: Apr 2016
Posts: 5
Fean is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 06-06-2016, 08:56 PM
BobBridges's Avatar
BobBridges BobBridges is offline Range COPY paste in workbooks sheets as variable Windows 7 64bit Range COPY paste in workbooks sheets as variable Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Quote:
Originally Posted by Fean View Post
i am getting a run time on the copy....
A run-time error, I guess you mean. And the error is...?

(Always include that, if you get one. Well, almost always.)
Reply With Quote
  #3  
Old 06-07-2016, 12:31 AM
Fean Fean is offline Range COPY paste in workbooks sheets as variable Windows 7 32bit Range COPY paste in workbooks sheets as variable Office 2010 32bit
Novice
Range COPY paste in workbooks sheets as variable
 
Join Date: Apr 2016
Posts: 5
Fean is on a distinguished road
Default

Quote:
Originally Posted by BobBridges View Post
A run-time error, I guess you mean. And the error is...?

(Always include that, if you get one. Well, almost always.)
Sorry indeed.
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"
Reply With Quote
  #4  
Old 06-07-2016, 06:51 AM
Fean Fean is offline Range COPY paste in workbooks sheets as variable Windows 7 32bit Range COPY paste in workbooks sheets as variable Office 2010 32bit
Novice
Range COPY paste in workbooks sheets as variable
 
Join Date: Apr 2016
Posts: 5
Fean is on a distinguished road
Default

Solved! forgot to use With sheet... end sheet. The paste special should be treated by this!!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range COPY paste in workbooks sheets as variable 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
Range COPY paste in workbooks sheets as variable 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
Range COPY paste in workbooks sheets as variable 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft