Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2013, 04:12 PM
macropod's Avatar
macropod macropod is offline paste fails error 1004 in VBA Excel 2010 Windows 7 64bit paste fails error 1004 in VBA Excel 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub Macro4()
    With Range("POYCompTable")
        .ListObject.ListRows.Add (1)
        Range("SummerCompTable").Range("A1:C1").Copy
        .ListObject.ListRows(1).Range.PasteSpecial
    End With
End Sub

__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 05-07-2013, 12:19 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
Default paste fail

Thanks for that; I would never have thought of putting a piece of code in the middle of a With loop but when you see it it's obvious enough. What I still do not understand is why the Copy has to be positioned between the Add and the Paste or should I say that the Paste has to be immediately after the Copy; (I tried it and it failed as before.)
If you have time to clarify I will go from very happy to ecstatic.
Reply With Quote
Reply

Tags
error1004, failure, paste

Thread Tools
Display Modes


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:25 PM.


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