Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-05-2013, 05:07 AM
mikec mikec is offline paste fails error 1004 in VBA Excel 2010 Windows XP paste fails error 1004 in VBA Excel 2010 Office 2010 32bit
Advanced Beginner
paste fails error 1004 in VBA Excel 2010
 
Join Date: Nov 2012
Posts: 30
mikec is on a distinguished road
Post paste fails error 1004 in VBA Excel 2010


I have 3 Excel tables. Table 1 (SummerCompTable) includes all the records found in tables 2 (POYCompTable) and 3 (ScratchCompTable). Table 1 is used to edit the records and has a column that indicates where each record in table 1 belongs. On completion of editing I need to copy edit table records to table 2, 3 or to both.
To get started I created the following macro:
Code:
Sub Macro4()
Range("SummerCompTable").Select 'Editing table
Selection.Range("A1:C1").Select 'Cols to be copied
Selection.Copy
Range("POYCompTable").Select 'Table 2
Selection.ListObject.ListRows.Add (1) 'New line at top of table
Selection.Range("A1:C1").Select 'Tried Range("A1") but paste still fails
Application.ActiveSheet.Paste 'Fails with run time error 1004 - error message "Paste method of Worksheet class failed"
'Selection.PasteSpecial 'This doesn't work either
End Sub
What I can't understand is that if I stop the macro before the activesheet.paste line I can complete the paste manually from the clipboard.
Any suggestions?

Last edited by macropod; 05-06-2013 at 04:13 PM. Reason: Added code tags
Reply With Quote
 

Tags
error1004, failure, paste



Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste special an Excel range into Outlook as an Excel Worksheet charlesh3 Excel Programming 3 02-04-2013 04:33 PM
paste fails error 1004 in VBA Excel 2010 Outlook 2010 & WM 6.5 - recurring appt fails to sync ghumdinger Outlook 1 08-11-2012 02:20 PM
paste fails error 1004 in VBA Excel 2010 Run time error 1004 yonasan Excel Programming 3 06-12-2012 11:08 PM
paste fails error 1004 in VBA Excel 2010 runtime error 1004 gbaker Excel Programming 11 06-06-2012 05:23 AM
paste fails error 1004 in VBA Excel 2010 Microsoft office 2010 error 2908 and error 1935 !!!!!!heeeeellpppp!!!!!!!!! bennypryde Office 1 01-05-2012 03:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:37 AM.


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