Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy paste code fails

In using the attached code the code stops after coping & pasting the 1st
line of the 2nd last sheet. Any clever ideas guys ?

Dim r As Integer
' ''''''''''''''''''''''''''''''''from row 2
r = 2
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets

Dim Rng As Range
Dim i As Range
Set Rng = ws.Range("K2", ws.Range("K" & ws.Rows.Count).End(xlUp))
For Each i In Rng
If i = "" Then
i.EntireRow.Copy
SHT.Range("K" & Rows.Count).End(xlUp)(r). _
EntireRow.PasteSpecial
r = r + 1

End If
Next i

Next ws


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Copy/Paste fails using Offset & Resize of myRange? [email protected] Excel Discussion (Misc queries) 3 November 21st 06 02:06 AM
copy and paste using vb code ASU Excel Discussion (Misc queries) 1 September 10th 06 01:41 AM
Filter Copy/Paste Fails - Two Ranges Selected? Craigm[_27_] Excel Programming 4 July 15th 05 04:16 PM
Help-Copy&Paste code Bourbon[_30_] Excel Programming 2 January 29th 04 02:47 PM
Need Help with Code - Copy & Paste JStone0218 Excel Programming 10 October 11th 03 04:09 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"