PC Review


Reply
Thread Tools Rate Thread

Copy and paste a row from a table

 
 
Brad
Guest
Posts: n/a
 
      20th Mar 2009
I have some code that operates in a loop that should filter a table for a
particular value, copy the visible cells and then paste them at the bottom of
the table. The filtering and copying works, but having trouble with pasting
to the bottom of the table. Here is the code snipet, any help would be
greatly appreciated.

With
Workbooks("Tables").Sheets("Top8").ListObjects("tblTop8Issue")
.Range.AutoFilter Field:=7
.Range.AutoFilter Field:=1
.Range.AutoFilter Field:=7, Criteria1:=(iCW - 1)
.Range.AutoFilter Field:=1, Criteria1:=iLoop
.DataBodyRange.SpecialCells(xlCellTypeVisible).Copy
.Range.AutoFilter Field:=1
.Range.AutoFilter Field:=7
Error -> .Range("tblTop8Issue[[#Headers],[Issue_Num]]").End(xlDown).Select
here ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Value = Top8CpaEntryForm.txtWeek
End With
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy paste a table column into another table lukepw Microsoft Word Document Management 4 3rd May 2010 11:28 PM
Search one table to copy and paste select data to another table Sarah Microsoft Access VBA Modules 1 12th Dec 2008 06:42 PM
Macro to copy linked table and paste as local table =?Utf-8?B?Q2xpdmU=?= Microsoft Access 2 7th Sep 2007 10:56 AM
Copy/Paste does not copy a table from Access to SQL Server =?Utf-8?B?RnhKaW0=?= Microsoft Access 1 20th Sep 2006 07:18 PM
How to copy records from One Table & paste to another Table from F =?Utf-8?B?SXJzaGFkIEFsYW0=?= Microsoft Access VBA Modules 1 24th Feb 2005 12:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:15 AM.